commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ortwin Gl├╝ck" <>
Subject Re: [HttpClient] HttpURLConnection wrapper problems caused by deficiencies in HttpClient
Date Tue, 03 Sep 2002 07:10:00 GMT
Jeff Dever wrote:
> For Problem1 we could store the status line as a string and add a getStatusLine
> method.  Alternatively, we could create a header for it with the name StatusLine
> (or perhaps just null) which would preserve the interface.

IMHO we should *not* save non-header information in the header data 
structure. The status line should have its own data structure. If this 
is a complex one, make a separate class.

> For Problem2 we could use a Vector in place of a HashMap for the headers so that
> the order is preserved, but would have abstract away the lookups by the name
> field (which there are many).  Alternatively, we could mirror the contents in
> the hashmap in a vector (or array) so that we still have fast and convienent
> lookups, but still have order preservation of the headers.

Storing headers / footers in a List is just fine. We don't need a 
HashMap since performance is not an issue here. Remember we usually 
don't have 100 Headers but maybe 10. Providing both HashMap and List is 
a code mess and does not add significant benefit.

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

View raw message