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

Check if Message.get_params return 3-tuple instead of str on parse_options_header #79

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions multipart/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def parse_options_header(value: Union[str, bytes]) -> Tuple[bytes, Dict[bytes, b
options = {}
for param in params:
key, value = param
if isinstance(value, tuple):
value = value[-1]
lorenpike marked this conversation as resolved.
Show resolved Hide resolved
# If the value is a filename, we need to fix a bug on IE6 that sends
# the full file path instead of the filename.
if key == 'filename':
Expand Down
Loading