Skip to content

Case-insensitivity of keys doesn't extend to set operations #965

@Dreamsorcerer

Description

@Dreamsorcerer

Would be nice to have this work correctly:

>>> d = multidict.CIMultiDict()
>>> d["CONTENT-LENGTH"] = "4"
>>> "Content-Length" in d.keys()
True
>>> {"Content-Length"} & d.keys()
set()  # Should get a result here
>>> {"CONTENT-LENGTH"} & d.keys()
{'CONTENT-LENGTH'}

I tried to do this in aiohttp to check if any of a set of headers is present.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions