Springboot 1.3.5 Upgrade 1.5.9 After the default use of the Tomcat 8.5 release GET request 400 exception information for the valid characters is defined in RFC 7230 and RFC 3986

Source: Internet
Author: User
Tags rfc

1.springboot 1.3.5 After upgrading 1.5.9 the use of the Tomcat 8.5 version is used before the TOMCAT7 GET request 400 exception information for the valid characters is defined in RFC 7230 a nd RFC 3986

2. Note that this is just a GET request. The POST request is no problem.

------- Solutions

UrlEncode The parameters of the GET request

param = encodeuricomponent (param);

Ps:

1.The RFC3986 documentation stipulates that only English letters (A-ZA-Z), Numbers (0-9),-_.~4 special characters, and all reserved characters are allowed in the URL.

2.Tomcat 8.0 has made some stricter restrictions on URLs

Therefore, many get requests contain special characters (the request data format is defined as JSON (Contentype/json)) in the lower version of the container is possible and the background can automatically recognize the parsing URL of the JSON format data,

However, it will not be available after the Tomcat container in version 8.0 and above.

-----A lot of people try to downgrade Tomcat, because many friends from Jdk7 to Jdk8 will consider using the lower version of the container (8.0.2-8.0.3 seems to be possible) for the strict checking of the container.

But I don't think this is the final solution, two reasons: 1. Service containers are difficult to avoid in order to adapt to the rapid development of technology to upgrade, just a matter of time and transcoding also protects the plaintext information.

2. Now the container's API and the spring API are automatically decode the URL, so don't worry about modifying the background code as before. Z This is great.

------I also refer to the following friend's post

http://blog.csdn.net/vickyway/article/details/46375971

Springboot 1.3.5 Upgrade 1.5.9 After the default use of the Tomcat 8.5 release GET request 400 exception information for the valid characters is defined in RFC 7230 and RFC 3986

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.