BUG1:java.lang.IllegalArgumentException: Invalid character found in the request target. The valid...

image.png

Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189)
翻译:注意:HTTP头解析错误的进一步发生将在调试级别记录。

java.galanterguillengeption:在请求目标中发现无效字符。有效字符在RFC 7230和RFC 3986中定义
意思在你的传参中有无效的字符,是需要转义的
我当时问题如下:


image.png

在filePath中有斜杠,所以参数传不过去
在传参前进行编码 再传,问题解决
var filePath = json.filePath;
var s= encodeURIComponent(filePath);
var targeturl = "${pageContext.request.contextPath}/toCheckDoc.do?fileName="+s;

你可能感兴趣的:(BUG1:java.lang.IllegalArgumentException: Invalid character found in the request target. The valid...)