Skip to content
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

Fix bug in the parsing of multipart headers. #306

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

primaljax
Copy link

When processing multipart headers, the intent is to split the header name from the value; however, if the value also contains a colon character, anything after the colon is lost. This issue specifically arises when Internet Explorer provides the entire path as the filename in the content-disposition header (e.g. "C:\file.txt").

This PR fixes the issue by limiting the split to the 1st colon character.

@danielcompton
Copy link
Contributor

Would you be able to add some tests for this change?

@primaljax
Copy link
Author

Sure. Working on some tests now.

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