Tomcat8-invalid character found in the request target.

Source: Internet
Author: User
Tags rfc

Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC

The Linux deployment project (which is running well locally, Tomcat version 7) shows an error in the title, and the TOMCAT8 version increases the checksum for the request.

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

The following characters are specified as reserved characters in RFC3986:

!* ' ();: @&=+$,/?#[]

There are also some characters that may cause ambiguity in the parser when they are placed directly in the URL. These characters are considered unsafe characters for a number of reasons.

-> space URL in the process of transmission, or the user in the process of typesetting, or text handlers in the process of processing URLs, it is possible to introduce insignificant spaces, or to remove those meaningful spaces

-> quotes and <> Quotes and angle brackets are often used to play the role of separating URLs in plain text

-> #通常用于表示书签或者锚点->% percent is used

as a special character for encoding unsafe characters, so it requires encoding

->{}|\^[ ] ' Some gateways or transport agents will tamper with these characters

Therefore, this error is due to the request of the URL parameter "illegal" caused.

Solution:

① reduces Tomcat version;

② URL code for the parameters of the URL;

Bowen uses the second method, as shown in the following illustration:

Related Article

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.