hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Unable to parse header: HTTP/1.0 200 OK
Date Fri, 06 Aug 2004 10:51:59 GMT
Ortwin Gl├╝ck wrote:

>
>
> 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.

Okay.

> 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.

Fair enough.

> 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 retry.

Tried that, didn't work. Thanks for your comments. I will now:
1) Contact the site provider, see if they can fix their broken site
2) Patch a version of HttpClient for my own use until the site fixes 
their headers

Thanks for your help.

Regards, Upayavira



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


Mime
View raw message