Message265526
I suspect for Demian’s 2.7 experiment, he used the older urllib.urlopen(), rather than urllib2.urlopen() as given in the original description. When I use urllib2.urlopen("http://localhost/"), I see
GET / HTTP/1.1
Accept-Encoding: identity
Host: localhost
Connection: close
User-Agent: Python-urllib/2.7
Even in the urllib (no 2) case, since it is using HTTP 1.0, I suspect not having Accept-Encoding is not such a problem.
The underlying HTTP library has always added “Accept-Encoding: identity” for HTTP 1.1 by default (https://hg.python.org/cpython/annotate/4a3e9871b41b/Lib/httplib.py#l444), so I am closing this. |
|
Date |
User |
Action |
Args |
2016-05-14 12:46:10 | martin.panter | set | recipients:
+ martin.panter, orsenthil, eric.araujo, karlcow, dabrahams, demian.brecht |
2016-05-14 12:46:10 | martin.panter | set | messageid: <1463229970.8.0.523530633494.issue8732@psf.upfronthosting.co.za> |
2016-05-14 12:46:10 | martin.panter | link | issue8732 messages |
2016-05-14 12:46:10 | martin.panter | create | |
|