[Zope] - RE: First install, First connect
Andy Dustman
adustman@comstar.net
Wed, 9 Dec 1998 14:29:57 -0500 (EST)
On Wed, 9 Dec 1998, Scott Robertson wrote:
> On Wed, 9 Dec 1998, Paul Everitt wrote:
>
> >
> > 1) telnet to 80 and do "GET /index_html HTTP/1.0" then hit return twice.
> > Email the results to the list.
> >
> I noticed this about Zope a few days ago. I'm the type of sick bastard
> that likes to telnet into my web and pop3 servers and issue commands
> directly. One thing I noticed, when I telnet into apache and do a "GET /"
> I only have to hit enter once, but when I telnet into Zope or for that
> matter BoboHTTPD I have to hit enter twice? I have no real knowledge of
> the HTTP protocol but is one of these programs not compliant?
Technically, an HTTP request should look like this:
GET /index_html HTTP/1.0
Host: ...
User-Agent: ...
<blank line>
<maybe multipart form data>
The headers after the request are optional, and there are many more that
could be supplied. With HTTP before 1.0, you did not need to specify the
protocol version, and that earlier versions didn't have anything beyond
the GET command. If you try "GET /" vs. "GET / HTTP/1.0", you will see
much different behavior, including in the response, at least with Apache.
The python BaseHTTPRequestHandler, however, always reads at least two
lines. This doesn't seem to break any client that I've ever heard of.
Read the docs in BaseHTTPServer.py and that might help a bit. And visit
http://www.w3c.org/Protocols for formal specs for HTTP/1.0 and HTTP/1.1
(among other things).
--
Andy Dustman You should always say "spam" and "eggs"
ComStar Communications Corp. instead of "foo" and "bar"
(706) 549-7689 | PGP KeyID=0xC72F3F1D in Python examples. (Mark Lutz)