This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjlee
Recipients
Date 2004-07-25.18:02:48
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=261020

The form "User-agent" is not incorrect, merely unconventional 
(see RFC 2616, section 4.2).

The .capitalize() calls were introduced to make headers 
properly case-insensitive while keeping old code working -- 
see patch 649742.

The problem has arisen because urllib2 recently switched to 
using httplib.HTTPConnection (and the .request() method in 
particular, which sends Content-Length automatically) where 
previously it used httplib.HTTP (which did not send Content-
Length automatically).

The real problem is that httplib.HTTPConnection.request() 
sends some headers without checking that they aren't 
already in the explicitly requested headers.  I have submitted 
patch 997626 to fix this.

Thanks for reporting this, Johannes!
History
Date User Action Args
2007-08-23 15:38:48adminlinkissue996159 messages
2007-08-23 15:38:48admincreate