commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Dever" <>
Subject RE: [httpclient] Add dependancy on commons-collections
Date Wed, 04 Sep 2002 20:45:54 GMT
There is actually another issue that will cause the wrapper to not return
all the headers as expected.  Httpclient performs some header compression
for repeated headers.  If more than one header with the same name is read,
the values are compressed into a comma seperated list.  A call to
getResponseHeaders() will have only one entry for the repeated header name,
at the position of the first appearance of that header name.

While the order is preserved in the list, the wrapper will not return the
headers exactly as sent due the compression.  

As a common use for HttpClient is for testing of HTTP servers, the actual
headers as read should be returned by getResponseHeaders() (for verification
purposes) and would therefore consider the "compression" to be "munging" and
a bug in httpclient.

I would have to conclude that a Map is an inadequate datastructure for
storing the headers.  Unfortunately (or perhaps fortunately) this makes the
beloved SequencedHashMap inadequate as well and will have to fix this with
other means.

Because the HttpURLConnection wrapper was voted in as a 2.0 feature, this
means that this bug will have to be fixed in the 2.0 timeframe as well.

-----Original Message-----
From: Vincent Massol []
Sent: Wednesday, September 04, 2002 3:38 PM
To: 'Jakarta Commons Developers List'
Subject: RE: [httpclient] Add dependancy on commons-collections

I believe the ability to retrieve the headers in the order they were
received is important for 2.0. It is needed by the HttpURLConnection
wrapper and if we want to ship it (which I think would be a good idea),
we need to fix the header ordering.

However, this does not mean we need to add a dependency to
commons-collection (although it might just be perfect for implementing
an ordered hashmap)!


> - Rod
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-
> For additional commands, e-mail: <mailto:commons-dev-

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message