Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python': 0.09; 'https': 0.09; 'tracing': 0.09; 'cc:addr:python-list': 0.10; 'subject:python': 0.11; 'library': 0.15; 'connect.': 0.16; 'subject:requests': 0.16; 'wrote:': 0.17; 'shipped': 0.17; 'jan': 0.18; 'code,': 0.18; 'requests': 0.18; '(or': 0.18; 'windows': 0.19; 'appropriate': 0.20; 'import': 0.21; 'http': 0.22; 'cc:2**0': 0.23; 'work.': 0.23; 'cc:no real name:2**0': 0.24; 'url:bugs': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'appreciated.': 0.26; 'list:': 0.27; 'module.': 0.27; '1.4': 0.29; 'ray': 0.29; 'url:mailman': 0.29; "i'm": 0.29; 'thursday,': 0.30; 'code': 0.31; 'url:python': 0.32; '-----': 0.32; "skip:' 20": 0.32; 'url:listinfo': 0.32; 'thanks': 0.34; 'something': 0.35; 'subject:': 0.36; 'but': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'subject:with': 0.36; 'should': 0.36; 'thank': 0.36; 'does': 0.37; 'two': 0.37; 'being': 0.37; 'why': 0.37; 'sent:': 0.37; 'subject:: ': 0.38; 'from:': 0.38; 'build': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'url:mail': 0.40; 'days': 0.60; 'you.': 0.61; 'matter': 0.61; 'side': 0.61; 'email name:python-list': 0.62; 'header:Reply-To:1': 0.68; 'obvious': 0.71; '2.7.': 0.84; '2013': 0.84; 'unclear': 0.84 X-Virus-Scanned: amavisd-new at appropriatesolutions.com Date: Thu, 3 Jan 2013 21:12:45 -0500 (EST) From: Ray Cote To: Barry Scott In-Reply-To: Subject: Re: Missing something obvious with python-requests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [71.181.74.160] X-Mailer: Zimbra 7.1.4_GA_2555 (Zimbra Desktop/7.1.4_11299_Mac) Cc: python-list@python.org 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: 54 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357265567 news.xs4all.nl 6881 [2001:888:2000:d::a6]:37524 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36096 Thank you. --Ray ----- Original Message ----- From: "Barry Scott" To: "Ray Cote" Cc: python-list@python.org Sent: Thursday, January 3, 2013 5:48:52 PM Subject: Re: Missing something obvious with python-requests The shipped python library code does not work. See http://bugs.python.org/issue7291 for patches. Barry On 3 Jan 2013, at 18:53, Ray Cote wrote: > 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 > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Ray Cote, President Appropriate Solutions, Inc. We Build Software 603.924.6079