John J Lee <[EMAIL PROTECTED]> added the comment: I think this was actually not a bug, and the fix should not have been applied. I guess this comment is just "for the record", as the fix is probably cruft that can't be removed now, since people will have started relying on it.
The only way that the Content-Length header could be in req.headers in the first place is if the user had explicitly requested that it be added (urllib2 adds that header to .unredirected_hdrs, but not to .headers). The user can no doubt provoke all kinds of other errors by adding random HTTP headers -- what makes this particular one special? .add_header() has always been a "you need to know what you're doing, or you'll break stuff" interface, and it's not really possible to "fix" that (at least not without changing the meaning of .add_header()). ---------- nosy: +jjlee _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1401> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com