Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle url decode exceptions #696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skykit-adamvernier
Copy link

If a url is requested that contains a % character the server will crash.
This change will handle exceptions from UrlDecoder.

java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
at java.net.URLDecoder.decode(URLDecoder.java:196)
at java.net.URLDecoder.decode(URLDecoder.java:101)
at com.koushikdutta.async.http.server.AsyncHttpServer$1$1.onBody(AsyncHttpServer.java:111)
at com.koushikdutta.async.http.server.AsyncHttpServerRequestImpl$2.onStringAvailable(AsyncHttpServerRequestImpl.java:83)
at com.koushikdutta.async.LineEmitter.onDataAvailable(LineEmitter.java:42)
at com.koushikdutta.async.Util.emitAllData(Util.java:23)
at com.koushikdutta.async.AsyncSSLSocketWrapper.onDataAvailable(AsyncSSLSocketWrapper.java:335)
at com.koushikdutta.async.AsyncSSLSocketWrapper$6.onDataAvailable(AsyncSSLSocketWrapper.java:322)
at com.koushikdutta.async.Util.emitAllData(Util.java:23)
at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:160)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:878)
at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:726)
at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
at com.koushikdutta.async.AsyncServer$8.run(AsyncServer.java:680)

@hyUrbanManager
Copy link

same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants