Re: Negotiating with a Proxy server
Re: Negotiating with a Proxy server
- Subject: Re: Negotiating with a Proxy server
- From: "Peter Lovell" <email@hidden>
- Date: Thu, 6 Feb 2003 16:26:59 -0500
>
Does anyone have any example code or other useful information for how to
>
negotiate with an HTTP Proxy server? I can detect, via Internet Config,
>
that the user has specified an HTTP proxy in his Internet preferences, but I
>
don9t know what I need to do to negotiate a connection via it. Where are
>
these details documented? Is it a standard? Any help would be greatly
>
appreciated.
Hi Larry,
for a standard web proxy server you don't really "negotiate". You connect
to it and send the HTTP request, and that's about it.
Here's a snippet from RFC 2068 (for HTTP 1.1)
5.1.2 Request-URI
The Request-URI is a Uniform Resource Identifier (section 3.2) and
identifies the resource upon which to apply the request.
Request-URI = "*" | absoluteURI | abs_path
<snip>
The absoluteURI form is required when the request is being made to a
proxy. The proxy is requested to forward the request or service it
from a valid cache, and return the response. Note that the proxy MAY
forward the request on to another proxy or directly to the server
specified by the absoluteURI. In order to avoid request loops, a
proxy MUST be able to recognize all of its server names, including
any aliases, local variations, and the numeric IP address. An example
Request-Line would be:
GET
http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
To allow for transition to absoluteURIs in all requests in future
versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI
form in requests, even though HTTP/1.1 clients will only generate
them in requests to proxies.
There are more details in the RFC. This proxy scheme also works for HTTP
1.0 but you can't send absolute form to those. So, if there's no proxy
just pass the request. If a proxy is configured, insert the http://
host.domain[:port] into the request.
Regards.....Peter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.