Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Oct 18, 2025

The -F option allows users to provide a file with a set of headers for a specific formpost section. This code used old handcrafted parsing logic that potentially could do wrong.

Rewrite to use my_get_line() and dynbuf. Supports longer lines and should be more solid parsing code.

Gets somewhat complicated by the (unwise) feature that allows "folding" of header lines in the file: if a line starts with a space it should be appended to the previous.

The previous code trimmed spurious CR characters wherever they would occur in a line but this version does not. It does not seem like something we want or that users would expect.

Test 646 uses this feature.

The -F option allows users to provide a file with a set of headers for a
specific formpost section. This code used old handcrafted parsing logic
that potentially could do wrong.

Rewrite to use my_get_line() and dynbuf. Supports longer lines and
should be more solid parsing code.

Gets somewhat complicated by the (unwise) feature that allows "folding"
of header lines in the file: if a line starts with a space it should be
appended to the previous.

The previous code trimmed spurious CR characters wherever they would
occur in a line but this version does not. It does not seem like
something we want or that users would expect.

Test 646 uses this feature.
@github-actions github-actions bot added the tests label Oct 18, 2025
@bagder bagder marked this pull request as ready for review October 18, 2025 10:06
@bagder bagder closed this in f847d2e Oct 18, 2025
@bagder bagder deleted the bagder/form-headers branch October 18, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant