On Monday, Dec 2, 2002, at 09:13 US/Pacific, Bob Showalter wrote:
[reply redirected to [EMAIL PROTECTED]]
-----Original Message-----
From: LRMK [mailto:[EMAIL PROTECTED]]
[..]
how do i find which domain name that the user typed in the
Address field. to implement hosts.
The host name is sent as a Host: request header by HTTP 1.1 browsers
You might also look at the HTTP::Daemon module, part of the libwww-perl
distribution, which implements an HTTP server.
you may wish to also look at
http://www.openpsp.org/
and
http://www.webmin.com/
to get a feel for how two perl based web-servers have been built.
There are a whole bunch of 'headers' that make an actual
HTTP request - as bob has noted the one you are looking
for is the Host: field - but you should remember that
this is the host_port form - hence you get 'host' only
if it is running on the canonical port 80, otherwise
expect to see the value set as
Host: libex:12347
or
Host: libex.wetware.com:12347
so you will want to have something that can parse
all of the headers into a hash for dealing with later on.
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]