Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 7.0.2
-
Fix Version/s: None
-
Component/s: HTTP
-
Labels:None
-
Number of attachments :
Description
I have an encoding issue with url query string.
I just post the link "http://localhost/search?q=中文" in ie6, and the servlet throws exception:
Caused by: java.lang.IllegalStateException: !utf8
at org.eclipse.jetty.util.Utf8StringBuilder.toString(Utf8StringBuilder.java:154)
at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To(UrlEncoded.java:308)
at org.eclipse.jetty.http.HttpURI.decodeQueryTo(HttpURI.java:561)
at org.eclipse.jetty.server.Request.extractParameters(Request.java:204)
at org.eclipse.jetty.server.Request.getParameter(Request.java:648)
at org.apache.tapestry5.internal.services.RequestImpl.getParameter(RequestImpl.java:72)
I'm sure request.setCharacterEncoding() has been called before getting the parameters.
I also see many comments from jetty developers with this issue, but no one really fixed it, you cant stop the terminal clients to request with non-utf8 characters, please do something.
Issue Links
- relates to
-
JETTY-1151
IllegalArgumentException !utf8 in Utf8StringBuilder when getting a request parameter
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Jan Bartel [ janb ] |
| Link |
This issue relates to |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Hi,
How are you sure that request.setCharacterEncoding() has been called before any of the content is retrieved?
I would recommend you try setting the System property org.eclipse.jetty.util.UrlEncoding.charset to whatever charset you want the url to be interpreted as.
If that doesn't work, then it would be helpful if you could try a newer version of jetty, say jetty-7.1.4 and report back.
thanks
Jan