hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <adr...@intencha.com>
Subject Host Header and IP Addresses
Date Tue, 01 Apr 2003 23:02:48 GMT
Hi guys,
We've just had an interesting support issue come through related to 
HttpClient.  It seems that in a particular configuration 
Microsoft-IIS/5.0 can't handle receiving an empty Host header.  Since 
HttpClient sends this when an IP address is used, our client is having 
problems.

The fix for us is simple, we'll just remove the IP address check from 
the old version of HttpClient we're using (or possibly just tell the 
client the problem is with their server), however I thought I'd point 
out the problem as there were discussions a while back on this behavior 
and as I recall it was a grey area of the HTTP/1.1 spec so this info 
might be useful.  The server correctly handles having no Host header or 
a the Host address with an IP address, just not a blank one.

I don't know that I'd propose anything change in HttpClient at this 
stage but thought I'd mention the problem here for the record.

Some sample outputs from my telnet tests:

[aj@sexy videovision]$ telnet 164.116.4.65 80
Trying 164.116.4.65...
Connected to web_sql.esd113.k12.wa.us.
Escape character is '^]'.
GET /esd_cms_filemgr/images/logos/google.gif HTTP/1.1
Host:
HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 01 Apr 2003 22:57:15 GMT
Content-Type: text/html
Content-Length: 102

<html><head><title>Error</title></head><body>The system
cannot find the 
file specified. </body></html>Connection closed by foreign host.
[aj@sexy videovision]$ telnet 164.116.4.65 80
Trying 164.116.4.65...
Connected to web_sql.esd113.k12.wa.us.
Escape character is '^]'.
GET /esd_cms_filemgr/images/logos/google.gif HTTP/1.1
Host: 164.116.4.65

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 01 Apr 2003 22:57:45 GMT
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Tue, 25 Mar 2003 07:37:56 GMT
ETag: "344c673a1f2c21:a58"
Content-Length: 2048

GIF89aP <snip>

Regards,

Adrian Sutton.


Mime
View raw message