Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36099

Re: Missing something obvious with python-requests

References <857538.2991.1357238893647.JavaMail.rgacote@Ray-iMac-2011.local> <17769250.2995.1357239221470.JavaMail.rgacote@Ray-iMac-2011.local>
Date 2013-01-04 13:56 +1100
Subject Re: Missing something obvious with python-requests
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.71.1357268216.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jan 4, 2013 at 5:53 AM, Ray Cote
<rgacote@appropriatesolutions.com> wrote:
> 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.

Not sure if it's related to your problem or not, but my understanding
of a non-SSL request through a proxy is that it'll be a GET request
(eg "GET http://google.com/ HTTP/1.0"). So the problem is only that
it's still doing GET requests when it's an https query (which is where
CONNECT is needed).

ChrisA

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Missing something obvious with python-requests Chris Angelico <rosuav@gmail.com> - 2013-01-04 13:56 +1100
  Re: Missing something obvious with python-requests Hans Mulder <hansmu@xs4all.nl> - 2013-01-04 16:00 +0100
    Re: Missing something obvious with python-requests Chris Angelico <rosuav@gmail.com> - 2013-01-05 02:24 +1100

csiph-web