[issue2756] urllib2 add_header fails with existing unredirected_header

2021-12-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Bug needs to be verified on 3.10 or 3.11. -- nosy: +terry.reedy versions: +Python 3.10, Python 3.11 -Python 2.6, Python 2.7 ___ Python tracker

[issue2756] urllib2 add_header fails with existing unredirected_header

2013-04-07 Thread Volodymyr Antonevych
Volodymyr Antonevych added the comment: Test urllib2 file -- nosy: +volodyaa Added file: http://bugs.python.org/file29705/1.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2756 ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2013-04-07 Thread Volodymyr Antonevych
Volodymyr Antonevych added the comment: Test HTTP server -- Added file: http://bugs.python.org/file29706/s.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2756 ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2011-03-26 Thread Facundo Batista
Facundo Batista facu...@taniquetil.com.ar added the comment: Senthil, I'm assigning this issue to you because you know more about this subject than me. Feel free to unassign if will not be working in it. Thanks! -- assignee: facundobatista - orsenthil

[issue2756] urllib2 add_header fails with existing unredirected_header

2009-04-22 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- keywords: +easy priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2756 ___ ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2009-02-12 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- stage: - test needed versions: +Python 2.6 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2756 ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-10-25 Thread John J Lee
John J Lee [EMAIL PROTECTED] added the comment: I agree there is a bug here: clearly the methods on the Request class are inconsistent with AbstractHTTPHandler.do_open() . I think Facundo's patch is good, though it needs a test. The general principle when fixing earlier bugs has been that the

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-08-16 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: What I think is that the AbstractHTTPHandler is grabbing the headers, in the do_open() method, in an incorrect way. Check the get_header() method from Request: def get_header(self, header_name, default=None): return self.headers.get(

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-08-14 Thread Senthil
Senthil [EMAIL PROTECTED] added the comment: The submitted patch has problems. It does not correctly solve this issue (which I want to confirm, if there is issue at all after understanding the logic behind unredirected_headers). My explanation of this issue and comments on the patch is here:

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-08-14 Thread Senthil
Senthil [EMAIL PROTECTED] added the comment: The problem with the patch was: The attached patch modifies the add_header() and add_unredirected_header() method to remove the existing headers of the same name alternately in the headers and unredirected_hdrs. What we observe is unredirected_hdrs

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: BitTorment, what would increase the possibility of accepting this is a patch also for the test suite (test_urllib2.py), checking this behaviour, for us to be sure that does not break again in the future. Could you please submit also this?

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-11 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10280/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756 __ ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-11 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10201/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756 __

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: I decided that the user should have full control over the headers sent. Any call to add_header() or add_redirected_header() will now check if a header with that same name has been set in the Request before (in both the header and the

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10200/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756 __

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10201/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756 __ ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-05 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: I can see that there will be a problem in this case. However, it may be that the authors found it more intuitive to always set the Content-Type to application/x-www-form-urlencoded when data is set. Their implementation is inconsistent

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-05 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: Sorry, the first example should read: #--- request = urllib2.Request('http://www.whompbox.com/headertest.php') request.add_data(data) f = urllib2.urlopen(request)

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-04 Thread david reid
New submission from david reid [EMAIL PROTECTED]: In urllib2 when using reusing a Request calling add_header doesn't work when an unredirected_header has been added. A good example (and the one that caught me out) is content-type. When making a POST request with no content-type set the current