[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2015-11-04 Thread Martin Panter
Changes by Martin Panter : -- superseder: Implement PEP 3108 -> urllib/httplib header capitalization ___ Python tracker ___

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2015-11-04 Thread Martin Panter
Martin Panter added the comment: Regarding the original bug reported by Cocobear, I think this is by design. The “addheaders” attribute seems to serve as a set of default header fields, although this is hardly obvious from the documentation. In fact the current documentation suggests you have

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2015-03-30 Thread Martin Panter
Martin Panter added the comment: According to https://bugs.python.org/issue18986#msg236161 that PEP isn’t going to be accepted, although no reason seems to have been given. So I wouldn’t hold back because of that. -- dependencies: +Add a case-insensitive case-preserving dict nosy:

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: I left some comments in the codereview. I think that having some half-baked solution is great, but I really would like to see a proper fix, i.e. with remove_header and other methods fixed. Ideally, you should add a UserDict implementation for headers that

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Ideally, we should just wait when PEP 455 lands, so we can use TransformDict for headers. Also, I don't think we can land a fix for this in any pythons out there, I would focus on making this right in 3.5 -- ___

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-24 Thread karl
karl added the comment: Ok my tests are ok. → ./python.exe -m unittest -v Lib/test/test_urllib2net.py test_close (Lib.test.test_urllib2net.CloseSocketTest) ... ok test_custom_headers (Lib.test.test_urllib2net.OtherNetworkTests) ... FAIL test_file (Lib.test.test_urllib2net.OtherNetworkTests)

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-24 Thread karl
karl added the comment: Opened issue #22478 for the tests failing. Not related to my modification. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550 ___

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-24 Thread karl
karl added the comment: OK after fixing my repo (Thanks orsenthil) I got the tests running properly. The inspection order of the two dictionary was not right, so I had to modify a bit the patch. → ./python.exe -m unittest -v

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-24 Thread karl
Changes by karl karl+pythonb...@la-grange.net: Removed file: http://bugs.python.org/file36698/issue-5550-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550 ___

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-23 Thread karl
karl added the comment: Ok this is an attempt at solving the issue with lowercase. I find my get_header a bit complicated, but if you have a better idea. :) I'll modify the patches. I have try to run the tests on the mac here but I have an issue currently. → ./python.exe -V Python 3.5.0a0

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-23 Thread karl
Changes by karl karl+pythonb...@la-grange.net: Removed file: http://bugs.python.org/file36695/issue-5550-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550 ___

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-23 Thread karl
karl added the comment: And I had to do a typo in patch3. Submitting patch4. Sorry about that. -- Added file: http://bugs.python.org/file36698/issue-5550-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-06-24 Thread karl
karl added the comment: @Mark, yup, I can do that. I just realized that since my contribution there was a PSF Contributor Agreement. This is signed. I need to dive a bit again in the code to remember where things fail. -- ___ Python tracker

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-06-17 Thread Mark Lawrence
Mark Lawrence added the comment: @Karl do you intend following up on this issue? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550 ___

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Case insensitive lookup will be more fool-proof than capitalized look up. I would in favor of going with case insensitive look up than the capitalized look up one. Because the headers could be added in multiple ways and we cannot be assured that they are all

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-28 Thread karl
karl added the comment: Yes case insensitive make sense. It seems it will require a lot of modifications in the code. So I guess maybe the first step is to identify where it could break. -- ___ Python tracker rep...@bugs.python.org

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread karl
karl added the comment: orsenthil, Added test for python 3.3 for testing the case insensitivity for has_header and get_header. The tests fail as it should. See issue-5550-test-1.patch I will make a patch to urllib/request.py to make it work. OK with you? -- keywords: +patch Added

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread karl
karl added the comment: First, Sanity check for myself to be sure to understand. == → python3.3 Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: Karl - a patch is welcome. BTW, I wanted to search for an already existing and I think open issue with a patch ( probably written by me) somewhere. We have to see what's the diff of that issue with new one. I will share that issue in this id. But yeah, this

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-19 Thread karl
karl added the comment: The wireshark trace is a different domain than the code example. But let's see. cocobear added: headers = [(Content-Type,application/oct-stream),] with a Content-Type, not the capitalized Type. BUT in the source code or urllib/request.py there is

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2013-03-19 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5550 ___ ___