Skip to content

Conversation

@nggit
Copy link
Owner

@nggit nggit commented Nov 27, 2025

Store response headers original casing in an interning table.

key = HeaderKey(b'Content-Type')

print(key)  # b'content-type'
print(key.name)  # b'Content-Type'

interning table is global (class-level), unbouded, but HeaderKey() is meant to be used for response header names (server-generated). You must not response.set_header(name, value) with a client-generated name.

@nggit nggit added this to the 0.5 milestone Nov 27, 2025
@sonarqubecloud
Copy link

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

Successfully merging this pull request may close these issues.

2 participants