in reply to Re^3: write a small Perl HTTP server
in thread write a small Perl HTTP server

No, that's incorrect:

The HTTP RFC (2616) defines the Request-Line thus (section 5.1):

Request-Line   = Method SP Request-URI SP HTTP-Version CRLF

And Request-URI thus:

Request-URI    = "*" | absoluteURI | abs_path | authority

So although you *may* supply an absolute path as an argument to GET, you may also supply a URI; in fact, you'll see that that's what virtually all clients send, because otherwise virtual hosts will be broken.

Replies are listed 'Best First'.
Re^5: write a small Perl HTTP server
by Anonymous Monk on Jul 09, 2004 at 17:36 UTC
    Virtual Hosts work with a Host: field in the header. An URI is syntactically correct in this place, however the semantic is "proxy this". It's mentioned because the protocol for proxies is HTTP too.
      Ugh, you're right, I forgot about the Host: header.

      ACK the point on semantic indication, too. I stand corrected!

      In any case, the IO::All code still needs to be fixed so that it looks for the object after a single slash; and without query params; and it should discard the HTTP version string, too, if it's not doing anything with it.