Splitting this out of #49303, as @hugovk suggested there.
HTTPMessage.getallmatchingheaders() has returned [] for every input since Python 3.0. It compares self.keys() entries against "name:", but keys() returns header names without the colon, so nothing ever matches:
Its only consumer was CGIHTTPRequestHandler, which @picnixz removed in 3.15 (#133810). The method is undocumented and untested, and since it has never returned anything, no working code can depend on its output — so removing it carries no real compatibility risk.
The older patch on #49303 went further and dropped the whole HTTPMessage class, but that one is a documented public type (it's what response.headers is), so I'd suggest keeping this issue to the method.
Proposal: deprecate in 3.16, remove in 3.18. Happy to send the PR if that's the direction.
Activity
picnixz commented on Jul 13, 2026
I am ok with either deprecating it or simply fixing it.
Re: reading the old thread let us just deprecate it.