Skip to content

ATS forwards extra carriage returns in header line endings #12195

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

Open
kenballus opened this issue Apr 16, 2025 · 0 comments
Open

ATS forwards extra carriage returns in header line endings #12195

kenballus opened this issue Apr 16, 2025 · 0 comments
Labels

Comments

@kenballus
Copy link

Hi,

If you send ATS a request with extra carriage returns in header line endings, it forwards them as-is.

For example, if you send the following request:

GET / HTTP/1.1\r\n
Host: echo\r\n
Extra-CRs: \r\r\r\r\n
\r\n

Then, ATS forwards the following:

GET / HTTP/1.1\r\n
Host: echo\r\n
Extra-CRs: \r\r\r\r\n
Client-ip: 172.18.0.1\r\n
X-Forwarded-For: 172.18.0.1\r\n
Via: http/1.1 traffic_server[a24326f7-ff3b-4679-9801-53028b257033] (ApacheTrafficServer/10.2.0)\r\n
\r\n

Note that the extra carriage returns are still present :)

If you send more than 3 extra (4 total) carriage returns in a single header line ending, though, they all get normalized away. Kinda fun.

-Ben

@bryancall bryancall added the HTTP label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants