Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'socket': 0.05; 'appropriate.': 0.09; 'subject:python': 0.11; 'sat,': 0.15; 'server,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'proxy,': 0.16; 'subject:requests': 0.16; 'tcp': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'requests': 0.18; 'seems': 0.23; 'host': 0.24; 'header:In-Reply-To:1': 0.25; '(which': 0.26; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'origin': 0.29; 'connection': 0.30; 'cases,': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'protocol': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'client': 0.36; 'subject:with': 0.36; 'should': 0.36; 'uses': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'url:ip addr': 0.62; 'between': 0.63; '2013': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=55K4DBpSeue4t3tDW6/YTR3Sq8hCgS62ddNgYuAwFjY=; b=AXGF+h7PmT5JY3fc0ebsmCSgpThaeeh2+u3feWps69kOfy4geXc46c1amNlIe8npSY 6jf3Lx7TsEgFCLP4olij81l4U2GUpEe1opQgZaJnxSKxxC+U+kPpnG2nyRAtL9HultDy s+p6kXkSQncKsd+5YE7ZklWPka/z82d+KRXHjxPdelOyx2UF1Yo07FUlsC9NduglB9EG m2/brmuIFSQlqpVh9BUkxzEA0E0C6TplyX0QKgvVCS4RevLRTt4bXlBjb+maZUCCrJ/h ydxq2yonqvw6BABAXcIY0fPp/Y8OfIYVEuJqInCr/3wOYqUQ5/00LcC9aYw9mzB06jtS 9/OA== MIME-Version: 1.0 In-Reply-To: <50e6ee72$0$6932$e4fe514c@news2.news.xs4all.nl> References: <857538.2991.1357238893647.JavaMail.rgacote@Ray-iMac-2011.local> <17769250.2995.1357239221470.JavaMail.rgacote@Ray-iMac-2011.local> <50e6ee72$0$6932$e4fe514c@news2.news.xs4all.nl> Date: Sat, 5 Jan 2013 02:24:30 +1100 Subject: Re: Missing something obvious with python-requests From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357313079 news.xs4all.nl 6894 [2001:888:2000:d::a6]:59309 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36110 On Sat, Jan 5, 2013 at 2:00 AM, Hans Mulder wrote: > It the proxy URL is http://192.168.24.25/, then the client should send > GET requests to the proxy in both cases, and the proxy should send GET > or CONNECT to the origin server, depending on whether origin URL uses > SSL. > > If the proxy URL is https://192.168.24.25/, then the client should send > CONNECT requests to the proxy, and the proxy should send GET or CONNECT > as appropriate. Are you sure? This seems backward. As I understand it, a GET request to a proxy triggers a GET request to the origin server, and a CONNECT request to a proxy triggers a TCP socket connection to the origin host (which may not even be an HTTP/HTTPS server). This has nothing to do with the protocol used between the client and the proxy. ChrisA