[issue22450] urllib doesn't put Accept: */* in the headers

Cory Benfield report at bugs.python.org
Fri Sep 9 18:24:14 EDT 2016


Cory Benfield added the comment:

So, leaping in on the Requests side of things for a moment, two notes. Firstly: copying curl is rarely a bad thing to do, especially for a behaviour curl has had for a long time.

However, in this case the stronger argument is that just because the RFCs say that Accept: */* is implied doesn't mean it can safely be omitted. In practice, origin servers behave unexpectedly when the header is omitted, and in general behave more predictable when it is emitted. For that reason, it should be added by Python's standard library. 

HTTP/1.1 is a protocol where "as deployed" means much more than "as specified", sadly.

----------
nosy: +Lukasa

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22450>
_______________________________________


More information about the Python-bugs-list mailing list