Skip to content

@RequestParam not supported for HTTP2 requests #35066

Closed as not planned
Closed as not planned
@luelueking

Description

@luelueking

dependency

 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.5.0</version> </parent> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>

Main.java

package org.example; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.Map; @SpringBootApplication public class Main { public static void main(String[] args) { SpringApplication.run(Main.class, args); } } @Controller @RequestMapping("/api") class RequestController { @PostMapping(path="/echo", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE) public ResponseEntity<String> processFormPostBodyAndParams( @RequestParam Map<String, String> body) { return new ResponseEntity<>("Body param map: " + body, HttpStatus.OK); } }

application.yml

server: port: 8088 http2: enabled: true

when use http1.1 it work

Image

when use http2 it not work
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions