EDIT:
This question is not valid. It turns out the transparent proxy made an HTTP 1.0 request, although urllib / httplib did an HTTP 1.1 request.
ORIGINAL QUESTION:
By default, it urllib2.urlopenalways makes an HTTP 1.0 request.
urllib2.urlopen
Is there any way to make it speak HTTP 1.1?
Why do you think it is not using http 1.1 yet? 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.)? This should show that it is sending a 1.1 GET request already.
urllib2 httplib HTTP-. Python 2.6.4 HTTP/1.1 httplib, 1.1, 1.0 0.9. 2.3, , -, (, , 1.5)
, -, :
CONNECT host:port HTTP/1.0
/1.0 .
python , urllib2?
Source: https://habr.com/ru/post/1724637/More articles:Less defined generics in C #? - collectionsIE addon development in .net - internet-explorerWith Git, how can I make some changes to the working copy in another branch? - gitWhy do I get a 403 ban when I call an external IIS-based MVC that returns a JSON result - jqueryGetting topic information from a style.css file in Wordpress - phpbest jQuery mouseover way? - jqueryHow can urllib2 / httplib speak HTTP 1.1 for HTTPS connections through a Squid proxy? - pythonCaching data using hidden divs - htmlUnable to set style for path in resource dictionary - silverlightWorkflow Options for Workflow Workflow - workflowAll Articles