[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-23 Thread Stanisław Jankowski
Stanisław Jankowski stach.jankow...@gmail.com added the comment: @stachjankowski: How did you find this issue? Are you porting from 2.x to 3.x or have new 3.x code that uses this function? No, it's just random finding. -- ___ Python tracker

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: No, it's just random finding. This strengthens my impression that no-one is actually using the function. Maybe we should just remove it from 3.3. -- ___ Python tracker rep...@bugs.python.org

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns

2011-11-23 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Let's make it useful, that's much better instead of removing it. I am +1 with Ezio's suggestion on this to return a list of tuples with matching headers. -- title: http.client.HTTPMessage.getallmatchingheaders() always returns [] -

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns

2011-11-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Let's make it useful, that's much better instead of removing it. I am +1 with Ezio's suggestion on this to return a list of tuples with matching headers. But there's already a function that does it:

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns

2011-11-23 Thread Stanisław Jankowski
Stanisław Jankowski stach.jankow...@gmail.com added the comment: This issue has been reported previously, in issue5053. Unfortunately, I overlooked. Sorry. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns

2011-11-23 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- superseder: - http.client.HTTPMessage.getallmatchingheaders() always returns [] ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13425 ___

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-23 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- title: http.client.HTTPMessage.getallmatchingheaders() always returns - http.client.HTTPMessage.getallmatchingheaders() always returns [] ___ Python tracker rep...@bugs.python.org

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-22 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13425 ___ ___ Python-bugs-list

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-22 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: getallmatchinheaders() is not documented, i.e. it's not part of the public API. Furthermore, it's only used by http.server.CGIHTTPRequestHandler, and the comment above it even says that it should be moved there. There are three options now: 1)

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-22 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: 4) Deprecate the function to be removed in 3.4 or 3.5 and fix it to always return []. This way we won't break any 3.0-3.2 code that is using the function, but the users of such code will start to get DeprecationWarnings in 3.3. There's no

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-21 Thread rohini
rohini rohinivin...@gmail.com added the comment: Please review the attached patch. Like getheaders, getallmatchingheaders would also return (header,value) tuples. It is not backward compatible with 2.7. -- keywords: +patch nosy: +rohini Added file:

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Stanisław Jankowski
New submission from Stanisław Jankowski stach.jankow...@gmail.com: http.client.HTTPMessage.getallmatchingheaders() always returns [] Python 3.2.2: Calling the code below does not give the expected result. sjankowski@sjankowski:~$ python3 Python 3.2.2rc1 (default, Aug 14 2011, 18:43:44) [GCC

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The problem seems to be in Lib/http/client.py:227. The code adds a ':' that is not found in the list of headers returned by self.keys(). -- nosy: +ezio.melotti ___ Python tracker

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13425 ___ ___ Python-bugs-list

[issue13425] http.client.HTTPMessage.getallmatchingheaders() always returns []

2011-11-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Actually the headers are already parsed, so the code should use self.items() instead of self.keys(), check if the key (without ':') matches, and append the key-value pair to the list. Having a list of key-value pairs seems more useful than