Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dreamsorcerer opened this issue Apr 11, 2024 · 0 comments
Open

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

Dreamsorcerer opened this issue Apr 11, 2024 · 0 comments

Comments

@Dreamsorcerer
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant