classification
Title: Urllib screws up capitalization in "User-Agent" HTTP Header
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Make urllib.request.Request.has_header() etc case-insensitive
View: 2275
Assigned To: Nosy List: Calvin.Owens, jcea, orsenthil
Priority: normal Keywords:

Created on 2012-11-02 16:54 by Calvin.Owens, last changed 2012-11-08 06:27 by orsenthil. This issue is now closed.

Messages (3)
msg174540 - (view) Author: Calvin Owens (Calvin.Owens) Date: 2012-11-02 16:54
Urllib encodes as: "User-agent"
The correct form is: "User-Agent"

This is quite important, as it makes this library totally unusable for scraping moronic websites which require a recognized User-Agent string to work correctly, of which there are many.
msg174547 - (view) Author: Calvin Owens (Calvin.Owens) Date: 2012-11-02 17:56
2275 hasn't been touched for almost 2 years.

If there was a fix in v3.3, it ought to be backported. But it doesn't look like they ever came up with one.
msg175135 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-11-08 06:27
Calvin. - I shall act upon old bug. The tricky nature of backwards compatibility sometimes let's it stale because we can not come t a good conclusion.
History
Date User Action Args
2012-11-08 06:27:52orsenthilsetnosy: + orsenthil
messages: + msg175135
2012-11-06 15:54:31jceasetnosy: + jcea
2012-11-02 17:56:47Calvin.Owenssetmessages: + msg174547
2012-11-02 17:01:56r.david.murraysetstatus: open -> closed
superseder: Make urllib.request.Request.has_header() etc case-insensitive
resolution: duplicate
stage: resolved
2012-11-02 16:54:13Calvin.Owenscreate