Can urllib2 make HTTP/1.1 requests?
http, python, urllib2
Solution
Why do you think it's not already using http 1.1? Have you tried something like...:
>>> import urllib2
>>> urllib2._opener.handlers[1].set_http_debuglevel(100)
>>> urllib2.urlopen('http://mit.edu').read()[:10]
connect: (mit.edu, 80)
send: 'GET / HTTP/1.1
(etc, etc)? This should show it's sending a 1.1 GET request already.
Problem
EDIT: This question is invalid. Turns out a transparent proxy was making an onward HTTP 1.0 request even though urllib/httplib was indeed making a HTTP 1.1 request originally. ORIGINAL QUESTION: By default `urllib2.urlopen` always makes a HTTP 1.0 request. Is there any way to get it to talk HTTP 1.1 ?