java.lang.IllegalArgumentException

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


Samebug tips2

This error is caused by malformed HTTP request. You are trying to access unsecured page through https.

Some bots are sending malformed HTTP requests to your site. Try to find their IP addresses in the access logs and ask them to fix the bots or blacklist them.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web15562

Solution icon of github
via GitHub by baohongfei
, 1 month ago
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of github
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of github
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of github
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of googlegroups
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of stackoverflow
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of stackoverflow
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of github
via GitHub by Monota
, 1 month ago
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of oraclecommunity
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Solution icon of stackoverflow
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Stack trace

  • 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.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:239) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1017) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2445) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
8 times, 1 day ago
Once, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 more bugmates