Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] ISO-8859-Encoded request-parameters

Hello,

 

I'm facing a problem with iso-8859-1 encoded get-parameters containing German umlauts. I'm using jetty 7.0.1.v20091125.

 

I found a few related issues in the jira (e.g. http://jira.codehaus.org/browse/JETTY-633), but they are all marked as resolved.

 

I also tried setting the character encoding manually (using ServletRequest.setCharacterEncoding() as suggested in http://jira.codehaus.org/browse/JETTY-1098), without success.

 

Here is the exception I get:

java.lang.IllegalArgumentException: !utf8

      at org.eclipse.jetty.util.Utf8StringBuilder.append(Utf8StringBuilder.java:122)

      at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To(UrlEncoded.java:292)

      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.getParameterMap(Request.java:659) 

      [...]

 

I had a quick look at the source. As far as I understand, httpURI.decodeQueryTo(MultiMap) does not pay attention to the encoding, and always delegates to UrlEncoded.decodeUtf8To(...)

UrlEncoded.decode88591To(...) is never called.

 

Or am I missing something?

 

Thanks,

Martin

 


Back to the top