Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mumoshu/264228 to your computer and use it in GitHub Desktop.
Save mumoshu/264228 to your computer and use it in GitHub Desktop.
[bug]org.mortbay.jetty.testing.HttpTester.parse
HttpTester.parse causes an error when given a non-ISO8859 string...
http://markmail.org/message/tw2q4wmk5foiov7f#query:httptester%20utf-8+page:1+mid:tw2q4wmk5foiov7f+state:results
I ran into an interesting situation using the HttpTester class. The
basic problem is that the response from my servlet is encoded in UTF-8,
and the HttpTester.parse(String rawHTTP) uses ISO-8859 and platform
encoding for the string character encoding, which may not contain all
the needed code points. Also, HttpTester.getContent() uses platform
encoding to interpret the raw bytes of the parsed content, which may not
be right at all.
In order to accommodate my needs, I had to add the following two methods
to a derived class. They might be useful in the HttpTester class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment