Glenn Linderman added the comment:
It is certainly true that getallmatchingheaders is broken... because the data
it is looking at has changed format.
Here is a replacement that is as compatible as can be, based on the changed
format.
name = name.lower()
n = len(name)
Changes by Martin Panter vadmium...@gmail.com:
--
dependencies: +CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
___
Martin Panter added the comment:
Posting a patch to remove the entire HTTPMessage class. This assumes my patch
for Issue 5054 is accepted, which will remove the only existing reference to
getallmatchingheaders().
--
Added file: http://bugs.python.org/file38143/remove-HTTPMessage.patch
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +r.david.murray
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
Martin Panter added the comment:
I agree with Catalin’s proposal to remove it straight away. It just causes
confusion, and to me the intended behaviour is not equivalent to
Message.get_all(). I would remove the entire HTTPMessage class and replace it
as an alias of email.message.Message.
Catalin Iacob iacobcata...@gmail.com added the comment:
So, how to move this further?
In #13425 Petri proposes 4 alternatives, copying them here:
1) Document the function to make it officially part of the public API
2) Rename and move the function to http.server
3) Leave it undocumented and
Petri Lehtinen pe...@digip.org added the comment:
My 4) actually meant that it should always return []. This is what it currently
does, so it could be spelled out clearly in the code.
IIRC, getallmatchingheaders() cannot be emulated one-to-one using get_all(),
because it handles continuation
Petri Lehtinen pe...@digip.org added the comment:
The CGIHTTPRequestHandler fix and test would be the best thing to start with,
though, as it's not related to the eventual fate of getallmatchingheaders().
--
stage: - needs patch
___
Python tracker
Changes by Petri Lehtinen pe...@digip.org:
--
nosy: +petri.lehtinen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
___
Python-bugs-list
Petri Lehtinen pe...@digip.org added the comment:
#13425 was marked as duplicate of this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.2 -Python 3.0
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
___
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
___
Python-bugs-list
Changes by Mike Watkins pyt...@mikewatkins.ca:
--
title: http.client.HTTPMessage.getallmatchingheaders() -
http.client.HTTPMessage.getallmatchingheaders() always returns []
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
I think unified diffs are preferred.
Isn't there an existing test for this method?
--
nosy: +gagenellina
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
Mike Watkins pyt...@mikewatkins.ca added the comment:
Re diffs, noted for the future.
Re tests:
# py3k-devel/Lib/test % grep -r getallmatchingheaders *
... Returns nothing, so not only does the email package need a test for
this but so does http.client.
Incidentally test_mailbox.py has a
Mike Watkins pyt...@mikewatkins.ca added the comment:
Further investigation ( grep -r getallmatchingheaders Lib/* ) reveals
that in addition to having no tests, and being implemented incorrectly
in http.client, getallmatchingheaders() is called only once, in
http.server; that code is also
18 matches
Mail list logo