Info: Error parsing http request Header Note:further occurrences of HTTP header parsing errors would be logged at DEBUG leve L.

Source: Internet
Author: User
Tags rfc

Error parsing HTTP Request Header

I have recently made an error in making a SPRINGMVC project, and the errors are as follows:

Info: Error parsing HTTP Request Header
Note:further occurrences of HTTP header parsing errors'll be logged at DEBUG level.

Displays the wrong HTTP request header, which is very depressing here, before this problem occurs because the submission data exceeds the header content of the definition,

At that time, the server.xml maxhttpheadersize in Tomcat had been set to a large enough size and why the problem still arose.

Then finally found the problem, the original JSON transmission when the inclusion of {}, which is why. Because after tomcat7 a version,

Added a new feature, which is to strictly follow the RFC 3986 specification for access resolution, while the RFC 3986 specification defines the URL

Only English letters (A-ZA-Z), Numbers (0-9),-_.~4 special characters are allowed

As well as all reserved characters (RFC3986 specifies the following characters as reserved characters:! * ' ();: @ & = + $,/? # []).

The workaround is simple and can be changed by modifying the last line of Tomcat's catalina.properties to

tomcat.util.http.parser.httpparser.requesttargetallow=| {}

Allow {}.

Info: Error parsing http request Header Note:further occurrences of HTTP header parsing errors would be logged at DEBUG leve L.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.