8.1.x: Fix output '\n' HTTP field line endings#8460
Merged
bneradt merged 1 commit intoapache:8.1.xfrom Oct 27, 2021
Merged
Conversation
This is another attempt to fix what was initially addressed in apache#8096 but got backed out via apache#8305. That more extensive patch was considered too invasive and potentially risky. This more targeted patch will fix clients that only send the \n endings but it will force the \r\n line ending on output. This was mostly in place except for header lines that get m_n_v_raw_printable set, which seems to be most header lines. The addition checks to see if the header line ends in \r\n. If it does not the m_n_v_raw_printable flag gets cleared and the logic that explicitly adds the line endings while be invoked on output.
ezelkow1
approved these changes
Oct 27, 2021
bryancall
approved these changes
Oct 27, 2021
shinrich
approved these changes
Oct 27, 2021
Member
shinrich
left a comment
There was a problem hiding this comment.
Looks good. Should catch all cases where the line ending is weird and ensure that it is reformated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another attempt to fix what was initially addressed in #8096 but
got backed out via #8305. That more extensive patch was considered too
invasive and potentially risky. This more targeted patch will fix
clients that only send the \n endings but it will force the \r\n line
ending on output.
This was mostly in place except for header lines that get
m_n_v_raw_printable set, which seems to be most header lines. The
addition checks to see if the header line ends in \r\n. If it does not
the m_n_v_raw_printable flag gets cleared and the logic that explicitly
adds the line endings while be invoked on output.