Date: Fri, 7 Oct 1994 10:16:50 +0100
Message-Id: <199410070916.KAA26613@wsinis10.win.tue.nl>
From: reinpost@win.tue.nl (Reinier Post)
To: Multiple recipients of list <www-proxy@www0.cern.ch>
Subject: Re: Proxy implementation questions
You (Chris Adie) write:
>
>I've just joined this list, so please excuse me if these questions
>have been answered before.
>
>I'm adding proxy capability to the HTTP server for Windows NT,
Just wondering ... can HTTP for Windows NT run CGI scripts?
(I have one that does caching.)
>1. Presumably the proxy should not change in any way the set of
> headers from the client before sending them on to the server.
> Not even the User-Agent: header. And vice versa.
My script doesn't modify any headers; not in the request, nor in the
response. (It used to do modify some, like the User-agent). It does
add some extra headers.
>2. What status code should the proxy return to the client if it
> cannot connect to the server because (a) It can't resolve foo.bar
> (b) The connect() fails?
I just return 500. If you want to do it right, don't ask here, just follow
whatever CERN httpd happens to implement.
>3. Presumably the request from the proxy to the server should be:
> GET /whatever HTTP/1.0
> How about the situation where "whatever" is actually
> http://here.there/something
> In that situation the proxy shouldn't send an initial / - but
> doesn't this mean it has to parse the "whatever" to see if it is
> actually a URL?
I don't understand; do you mean the client may ask for
http://proxy.server/http://another.proxy/http://real.remote.host/real/path
?
>4. Assumption implicit in the preceeding question - presumably
> a leading slash in a target string means that it is a request for
> something on the local system, whereas no leading slash means that
> it is a URL which must be proxied?
I run into the same problem in my script, and it used to affect the setting
of the $http_proxy environment variable, too: the URL
http://proxy.server/some/request
is ambiguous; it is usually taken to mean a
GET /some/request
to the proxy.server, but only when some/request is a URL, is taken to mean
GET some/request
(Looks like a hack to me.)
>5. How important is it that a proxy service should use a different
> port from the local http service?
I think service maintainers are free to decide this for themselves.
>From the client's point of view, the proxy could be anywhere.
-- Reinier Post reinpost@win.tue.nl a.k.a. <A HREF="http://www.win.tue.nl/win/cs/is/reinpost/">me</A>