Error parsing HTTP request header
Recently, an error was reported when doing a spring MVC project. The error is as follows:
Information: error parsing HTTP request header
note: further occurrences of HTTP header parsing errors will be logged at debug level
It’s very depressing to display the wrong HTTP request header. This problem occurred before because the submitted data exceeded the defined header content
At that time, the maxhttpheadersize of server.xml in Tomcat had been set large enough. Why did the problem still occur
Later, I found out the problem. It turned out that the JSON transmission included {}, which is the reason. Because after a certain version of tomcat7
A new feature is added, that is, access resolution is strictly in accordance with RFC 3986 specification, which defines the
Only English letters (a-za-z), numbers (0-9), – ﹣ are allowed~ 4 special characters
And all reserved characters (rfc3986 specifies the following characters as reserved characters:! * ‘();: @& amp; = + $ ,/?# [ ])。
The solution is actually very simple. You can change the last line of Catalina. Properties of Tomcat to
tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}
Allow {}
Similar Posts:
- Spring Error: ‘artifactId‘ with value ‘xxxx‘ does not match a valid id pattern.
- How to Solve Error: Server returned HTTP response code: 403 for URL:
- [Solved] Unapp H5 Error: Access to XMLHttpRequest at ‘http://www.localtest.com/api/api/v1/job/getPositionList’…
- [Solved] Upload Files Request processing failed;nested exception is org.springframework.web.multipart.MultipartException:Failed to parse multipart servlet request;multipart/form-data request failed.(**No permission**)
- JavaWeb HttpServletRequest (How to Get Line, Header and Body)
- How to Use awk to Analyze Nginx Log
- Python crawling picture prompt urllib.error.httperror: http error 403: forbidden solution
- Client IP address forgery, CDN, reverse proxy, access to those things
- Nginx Timeout Error: upstream timed out (110: Connection timed out) while reading response header from ups…
- XML parsing & special character error