Skip to content

fix: reject @ character in header names#13314

Open
mmustafasenoglu wants to merge 1 commit into
apache:masterfrom
mmustafasenoglu:fix-header-name-at-char
Open

fix: reject @ character in header names#13314
mmustafasenoglu wants to merge 1 commit into
apache:masterfrom
mmustafasenoglu:fix-header-name-at-char

Conversation

@mmustafasenoglu

Copy link
Copy Markdown

Summary

Remove the exception that allowed '@' character in header names.

Changes

  • Removed the special case that allowed '@' in header names
  • Updated the comment to reference RFC 9110 Section 5.1

Why

RFC 9110 Section 5.1 states that header field names must consist only of tchar characters:

tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
      / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
      / DIGIT / ALPHA

'@' is not in this list, so header names containing '@' should be rejected with a 400 response.

The previous fix for INKqa09141 incorrectly allowed '@' in header names.

Fixes #12082

Remove the exception that allowed '@' character in header names.
According to RFC 9110 Section 5.1, header field names must consist
only of tchar characters, and '@' is not a valid tchar.

The previous fix for INKqa09141 incorrectly allowed '@' in header
names. This patch removes that exception and adds a comment explaining
the RFC requirement.

Fixes apache#12082
@mmustafasenoglu

Copy link
Copy Markdown
Author

Hello! This is my first contribution to Apache Traffic Server. Could you please trigger CI for this bug fix PR? Thank you!

@JosiahWI

Copy link
Copy Markdown
Contributor

@mmustafasenoglu This is a bug fix from a standards point of view, but anyone relying on the @ character in internal headers could perceive this as a breaking change. Would you like to label it with Bug, Incompatible, or both? I expect it to be discussed by the community within a week, but I'm interested in your opinion on it.

@mmustafasenoglu

Copy link
Copy Markdown
Author

Hi @JosiahWI, thanks for asking! I think both labels make sense here. While this is a bug fix for RFC 9110 compliance, the character could indeed be used in internal headers, so marking it as Incompatible is appropriate. I've added both Bug and Incompatible labels. Thanks!

@bneradt

bneradt commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

[approve ci]

@mmustafasenoglu

Copy link
Copy Markdown
Author

Hi, following up on this bug fix PR. It fixes the @ character validation in header names per RFC 9110. Would appreciate a review. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@ is incorrectly accepted within header names

3 participants