On Fri, 20 Nov 1998, Vianet System Administration wrote:
> I can telnet to a web server port 80 and issue a command like
> GET http://www.somedomain.com/
> ..and have it return the page
That looks as if it's trying to be an old-fashioned HTTP/0.9-style
request, but I don't think it's quite correct, even if servers might
respond to it. The procedure for retrieving
http://www.somedomain.com/somepath/somedoc.html by HTTP/0.9 protocol
would be:
telnet www.somedomain.com 80
GET /somepath/somedoc.html
and a single newline.
However, this procedure won't work on name-based virtual hosts, and is
generally obsolete. I just tried this style of request on our squid
and it didn't seem to be supported anyway.
A more appropriate procedure nowadays (including name-based
virtual hosts) would be
telnet www.somedomain.com 80
GET /somepath/somedoc.html HTTP/1.0
Host: www.somedomain.com
and two newlines.
> What is the syntax to do this with a proxy?
telnet proxy 8080 (for example)
GET http://www.somedomain.com/somepath/somedoc.html HTTP/1.0
and two newlines.
A quick test suggests that squid doesn't need an extra Host: header to
be sent by the requester, even for a name-based virtual host; it
presumably creates its own. That makes sense to me - it has all the
information that it needs for doing so. Perhaps the experts would
care to comment.
Oh, you'll then need to strip off the HTTP response headers if you
only wanted the document itself.
cheers
Received on Fri Nov 20 1998 - 06:26:14 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:43:11 MST