trungn1992 / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Httplib2 does not check for User-Agent header before creating a user-agent header #200

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. call http.request(url, headers={'User-Agent':'Blah'}

What is the expected output? What do you see instead?
I expect the recieving server to see a user-agent of blah or Blah

Instead the server gets two headers. a User-Agent header and a user-agent 
header with values Blah and httplib2 respectively.

What version of the product are you using? On what operating system?
httplib2 0.7.1 I haven't checked with httplib2 0.7.2

Please provide any additional information below.

Original issue reported on code.google.com by daH4...@gmail.com on 6 Feb 2012 at 10:52

GoogleCodeExporter commented 8 years ago
Should be 'user-agent', all lower case:

  http://code.google.com/p/httplib2/source/browse/python2/httplib2/__init__.py#1389

Original comment by joe.gregorio@gmail.com on 1 Mar 2012 at 3:42