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: Unable to parse header: HTTP/1.0 200 OK
Date Thu, 05 Aug 2004 11:31:12 GMT

Upayavira wrote:

> I'm getting an HttpException: Unable to parse header: HTTP/1.0 200 OK 
> Using a command like the following command:
> curl -u user:pass -I -i "http://mysite:6998/page.exe?id=22222"
> I got the following output:
> HTTP/1.1 200 OK
> Server: Microsoft-IIS/5.0
> Date: Thu, 05 Aug 2004 10:20:32 GMT
> Connection: close
> HTTP/1.0 200 OK
> content-type: text/html
> content-length: 35079
> Connection: Keep-Alive

Given the exception you are seeing, it is likely that the server really 
sends the above output. Naturally this sort of response is *completely* 
out of any HTTP spec. Not even is the response malformed, the headers 
are also contraditory.

God knows what causes the server to misbehave so badly. You might want 
to ask the manufacturer for support. Please don't ask for HttpClient 
supporting arbitrary garbage like that IIS response.

However the issue of duplicate HTTP respone lines or headers was raised 
before, I think. But I can't remember it's resolution at the moment. I 
guess we have built-in support for duplicate Connections headers, and 
the like. You may want to set HttpClient to lenien (non-strict) mode and 


Ortwin Glück

  NOSE applied intelligence ag

  ortwin glück                      [www]      http://www.nose.ch
  software engineer
  hardturmstrasse 171               [pgp id]           0x81CF3416
  8005 zürich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12

To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message