hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <ortwin.glu...@nose.ch>
Subject Re: [PATCH] code page problem fix (Review)
Date Thu, 09 Jan 2003 08:27:23 GMT
I reviewed your patch and noticed the following:

- The HTTP charset is ISO-8859-1 and *not* US-ASCII !

- Does not cover the NTLM class: the NTLM class makes excessive use of 
String.getBytes(String) but all with hard-coded and repeated "ASCII" 
encoding identifiers. These should define a class-local constant for it. 
Some of the methods throw UnsupportedEncodingException. This exception 
should be caught internally because ASCII has to be supported by *all* 
JVM implementations.

- I noticed there are some really strange methods (toUsingCharset) in 
URIUtil. What the heck are they for? They do basically nothing but 
replace missing characters with question marks.... I don't think this is 
really useful for anything.

Following line numbers refer lines AFTER applying your patch.

there are still getBytes() with default encoding in:
- PostMethod lines 361, 809
- PutMethod line 189
- Base64 line 136
- SimpleHttpConnection line 139
- TestAuthenticator: all lines like String expected = "Basic " + new 
String(Base64.encode("username:password".getBytes()));
- TestBase64
- TestStreams
- TestWebappMethods
- TestWebappRedirect

there are still calls to new String(byte[]) with default encoding in:
- PostXML sample
- Authenticator lines 288, 833
- HttpConnection line 666; line 635 has a static reference to "ISO-8859-1"
- HttpMethodBase line 692
- TestStreams lines 36, 51, 99, 119

- I did not run any tests for now

Cheers

Odi


Mime
View raw message