>> >The problem is in org.apache.commons.httpclient.HttpMethodBase.
>> >For example, if the server sent 2 "Content-Length: 455" headers,
>> >the header instance will get a value like "455, 455", which
>> >can not be parsed into integer. Attachment is my modified code. 
>> 
>> The root problem is that the types are mixed up in the header map. 
>> A map value is either a String or a list containing Strings - 
>> hopefully. 
>> This mixture might save a few bytes of memory but causes all kind of 
>> programming headache. You always have to find out which kind of value 
>> your dealing with and act upon it appropriately. This is - as the 
>> above-quoted bug message demonstrates - error-prone and 
>> time-consuming.
>> Is there a chance to change that? I'd like to see the second variant, 
>> i.e. get rid of the String-only stuff.
>
>Probably, I didn't understand you suggestion very well...
>All HTTP headers need to be read into bytes or Strings and then
>parsed into whatever you want. However, String is the most generic
>way to represent header value.  Are you suggesting to 'type' 
>header values based on the header names ?

Oh, I am sorry. What I said was about *parameters* and not about 
*headers*. Blush!

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH i. Gr.
  Dipl.-Inform.
  Rainer Klute             E-Mail:  [EMAIL PROTECTED]
  K�rner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to