Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31270
| Date | 2012-10-15 11:57 +1100 |
|---|---|
| From | Cameron Simpson <cs@zip.com.au> |
| Subject | Re: Understanding http proxies |
| References | <20121013204358.6d400240@pcolivier.chezmoi.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2187.1350262654.27098.python-list@python.org> (permalink) |
On 13Oct2012 20:43, Olive <diolu@bigfoot.com> wrote: | I am trying to understand how to build an http proxy server in python, | and I have found the following example: | http://www.oki-osk.jp/esc/python/proxy/ | | But I do not have found an exact description of what exactly a proxy | server is suppose to do (all references gice only the basic principe of | proxy that I know). In the following model | | Client <-> Proxy <-> Server | | it seems when I read the code above that the proxy acts mostly as an | orinary server with respect to the client except that it is supposed to | receive the full URL instead of just the path. Am I right? Is there any | documentation on what an http proxy is supposed to implement. As mentioned elsewhere, in HTTP 1.0 you get a full URL in the opening line. In HTTP 1.1 you get the path component in the opening line and the host part in the Host: header of the request. Have a read of RFC2616 (which defines HTTP 1.0): http://tools.ietf.org/html/rfc2616 It has sections on proxies, too, outlining which they must do beyond what a plain HTTP server must do (not much, but a few things, and there are proxy-specific authentication fields available too): Proxy Servers http://tools.ietf.org/html/rfc2616#section-8.1.3 Proxy Authenticate http://tools.ietf.org/html/rfc2616#section-14.33 Cheers, -- Cameron Simpson <cs@zip.com.au> There's two kinds of climbers...smart ones, and dead ones. - Don Whillans
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Understanding http proxies Olive <diolu@bigfoot.com> - 2012-10-13 20:43 +0200 Re: Understanding http proxies Chris Angelico <rosuav@gmail.com> - 2012-10-14 05:50 +1100 Re: Understanding http proxies Tim Roberts <timr@probo.com> - 2012-10-14 12:58 -0700 Re: Understanding http proxies Cameron Simpson <cs@zip.com.au> - 2012-10-15 11:57 +1100 Re: Understanding http proxies Olive <diolu.remove_this_part@bigfoot.com> - 2012-10-15 09:53 +0200
csiph-web