Skip to content

Conversation

@gregw
Copy link
Contributor

@gregw gregw commented Nov 22, 2024

Added modes to allow strict requirement for CRLF termination of headers and/or chunks

Added modes to allow strict requirement for CRLF termination of headers and/or chunks
@gregw gregw requested review from joakime and lorban and removed request for lorban November 22, 2024 23:20
Added modes to allow strict requirement for CRLF termination of headers and/or chunks
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. What happens now if we have a request with mixed EOL, e.g. some are just \n, and some \r\n, still good and we have tests?
  2. Please update the documentation about the compliance, defaulting to 9110 where now is 7230 in programming-guide/server/compliance.
  3. This must be backported to 12.0.x, so I would rather rebase this PR on 12.0.x and then merge forward.

Added modes to allow strict requirement for CRLF termination of headers and/or chunks
Updates from review
@gregw
Copy link
Contributor Author

gregw commented Nov 26, 2024

  1. What happens now if we have a request with mixed EOL, e.g. some are just \n, and some \r\n, still good and we have tests?

If configured to accept LF EOL, then we accept a mix of LF and CRLF. I guess we could have a semi strict mode that once you see a LF then any CRLF is an error... but that's not what the RFC says. If you want to be strict, then just accept CRLF only.

  1. Please update the documentation about the compliance, defaulting to 9110 where now is 7230 in programming-guide/server/compliance.

Done.

  1. This must be backported to 12.0.x, so I would rather rebase this PR on 12.0.x and then merge forward.

I'm not sure we need to backport. There is no actual issue with jetty here and this is just tightening the compliance as a future proofing exercise. Let's talk offline.

@gregw gregw requested a review from sbordet November 27, 2024 20:57
@gregw gregw merged commit 4cef69c into jetty-12.1.x Nov 28, 2024
10 checks passed
@gregw gregw deleted the fix/strictCRLFComplianceMode branch November 28, 2024 22:16
@olamy olamy mentioned this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants