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: