the environmental background of the problems and what methods you have tried
Tomcat added validation for http headers after 7.0.73, 8.0.39, 8.5.7.
specifically, some rules have been added to limit the normalization of HTTP headers.
org.apache.tomcat.util.http.parser.HttpParser-sharpIS_NOT_REQUEST_TARGET [] defines a bunch of not request target
if(IS_CONTROL[i] || i > 127 || i == 32 || i == 34 || i == 35 || i == 60 || i == 62 || i == 92 || i == 94 || i == 96 || i == 123 || i == 124 || i == 125) {
IS_NOT_REQUEST_TARGET[i] = true;
}
I don"t really want to use POST, and because it is embedded Tomcat, I still want to modify the configuration of springboot for the convenience of development.
I just looked at the configuration related to server.tomcat.*, but I haven"t found a solution to the problem of illegal characters-sharp-sharp-sharp problem description
related codes
/ / Please paste the code text below (do not replace the code with pictures)
< parent >
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!--<version>1.5.14.RELEASE</version>-->
<version>2.0.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
what result do you expect? What is the error message actually seen?
request URL: http://localhost/xxx/ Chinese parameters
:java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
many people have given solutions, but they still feel inflexible and still want to configure them through springboot.