Understanding http proxies

Chris Angelico rosuav at gmail.com
Sat Oct 13 14:50:31 EDT 2012


On Sun, Oct 14, 2012 at 5:43 AM, Olive <diolu at bigfoot.com> wrote:
> 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.

The easiest way to test this is to knock together a quick little
server, set your browser to use localhost as a proxy, and see what
requests you get.

You're correct as regards most requests, but HTTPS is more
complicated. All your proxy will see is a CONNECT request; you have to
accept or deny on the basis of address alone, you don't get the whole
URL (for obvious reasons). But that aside, yes, you'll normally get a
request that looks pretty similar to what the origin server would get.

ahh, happy memories of MUDding through a local proxy that permitted
CONNECT on more ports than 443... and even happier memories of getting
port 23 opened to direct access, hehe...

ChrisA



More information about the Python-list mailing list