[kaffe] Request Headers for HttpURLConnection

Sebastian Mancke asteban at gmx.net
Fri Jul 18 08:37:01 PDT 2003


Hello.

> >>You're using a Vector to store request properties. Why not use a map
> >>instead, like GNU Classpath does 
I had no big reason.

1. The response headers where already organized in an Vector,
  so i thought it would be staight forward to keep them equal.
2. Appending at the end, and iterating over them looked for me like a list.
  (small benefit: It keeps the order, even if this is not required for http)

I think, a Map has no drawbacks,
if you prefer it, I'll do another patch.


BTW: 
I think, that the GNU Classpath implementation is not korrekt.
>>  req_props.put(key.toLowerCase(), value);
They convert all keys to lower case, but some web servers stand on
case sensitive header keys. 
(For example, the apache don't accepts 'Content-type', if I remember right)


Sebastian.




More information about the kaffe mailing list