Skip to content

Refs #36520 -- Only passed header value for parsing on multi-part forms #19757

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RealOrangeOne
Copy link
Member

Trac ticket number

Semi-related to ticket-36520

Branch description

Parsing should only be done on the value. The implementation happens to work, but shouldn't depend on that working.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

Parsing should only be done on the value. The implementation happens to work, but shouldn't depend on that working.
@RealOrangeOne
Copy link
Member Author

@nessita as mentioned on ticket-36520. There aren't any new tests to cover this, but the existing suite still passes, which is a good sign!

@nessita nessita self-requested a review August 21, 2025 14:21
name, value = main_value_pair.split(":", 1)
name, value_with_params = line.decode().split(":", 1)
name = name.strip().lower()
value, params = parse_header_parameters(value_with_params.lstrip(" "))
Copy link
Contributor

@nessita nessita Aug 21, 2025

Choose a reason for hiding this comment

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

What's the need for the lstrip? no test fails if we remove it 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants