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.044 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'python': 0.09; 'https': 0.09; 'tracing': 0.09; 'subject:python': 0.11; 'connect.': 0.16; 'subject:requests': 0.16; 'code,': 0.18; 'requests': 0.18; '(or': 0.18; 'windows': 0.19; 'import': 0.21; 'http': 0.22; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'appreciated.': 0.26; 'list:': 0.27; 'module.': 0.27; '1.4': 0.29; "i'm": 0.29; 'code': 0.31; "skip:' 20": 0.32; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'something': 0.35; 'but': 0.36; 'subject:with': 0.36; 'should': 0.36; 'does': 0.37; 'two': 0.37; 'being': 0.37; 'why': 0.37; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'days': 0.60; 'matter': 0.61; 'side': 0.61; 'header:Reply-To:1': 0.68; 'obvious': 0.71; '2.7.': 0.84; 'unclear': 0.84 X-Virus-Scanned: amavisd-new at appropriatesolutions.com Date: Thu, 3 Jan 2013 13:53:44 -0500 (EST) From: Ray Cote To: python-list@python.org In-Reply-To: <857538.2991.1357238893647.JavaMail.rgacote@Ray-iMac-2011.local> Subject: Missing something obvious with python-requests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [64.139.71.205] X-Mailer: Zimbra 7.1.4_GA_2555 (Zimbra Desktop/7.2.1_11637_Mac) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ray Cote 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357239706 news.xs4all.nl 6981 [2001:888:2000:d::a6]:36464 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36076 Hello List: I seem to be missing something obvious in terms of using proxies with the requests module. I'm using requests 1.4 and Python 2.7. Have tried this on Centos 6 and Windows XP. Here's the sample code, right out of the manual: import requests proxies = { 'https': '192.168.24.25:8443', 'http': '192.168.24.25:8443', } a = requests.get('http://google.com/', proxies=proxies) When I look at the proxy log, I see a GET being performed -- when it should be a CONNECT. Does not matter if I try to get http or https google.com. Clearly I'm missing something fundamental here. But after two days of fiddling with the code and tracing through requests I'm still unclear as to why requests is not using the proxy information. Any help (or slap on the side of the head) appreciated. Thanks --Ray