Skip to content

8.1.x: Fix output '\n' HTTP field line endings - #8460

Merged
bneradt merged 1 commit into
apache:8.1.xfrom
bneradt:fix_output_line_endings_81x
Oct 27, 2021
Merged

8.1.x: Fix output '\n' HTTP field line endings#8460
bneradt merged 1 commit into
apache:8.1.xfrom
bneradt:fix_output_line_endings_81x

Conversation

@bneradt

@bneradt bneradt commented Oct 26, 2021

Copy link
Copy Markdown
Contributor

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.

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.
@bneradt bneradt added the HTTP label Oct 26, 2021
@bneradt bneradt added this to the 8.1.3 milestone Oct 26, 2021
@bneradt
bneradt requested a review from ezelkow1 October 26, 2021 23:29
@bneradt bneradt self-assigned this Oct 26, 2021
@bneradt bneradt changed the title Fix output '\n' HTTP field line endings 8.1.x: Fix output '\n' HTTP field line endings Oct 26, 2021

@shinrich shinrich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Should catch all cases where the line ending is weird and ensure that it is reformated

@bneradt
bneradt merged commit 5cad961 into apache:8.1.x Oct 27, 2021
@bneradt
bneradt deleted the fix_output_line_endings_81x branch October 27, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants