-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(headers): Add Content-Disposition header #680
Conversation
}; | ||
|
||
for section in sections { | ||
let mut parts = section.split('='); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be sections.splitn(2, '=')
, in case any values are foo=bar=baz
.
@mikedilger indeed, this is a lot of work! awesome! I've reviewed the code, though I must say, I'm not too familiar with this header, so I may have missed something. |
I think I have addressed everything above except using url::percent_encoding, which depends on PR servo/rust-url#134 |
Seems a new version is needed of the url crate? |
Precisely. I'm in no hurry to get this PR merged as I can use raw headers in the meantime. But if you like things tidy, @SimonSapin would have to make a release. |
I just published |
@mikedilger I see it's passing now. Awesome! Could you rebase this into a single commit, |
027409e
to
8568844
Compare
Ok, rebased onto master and collapsed into a single commit |
Seems another PR updated the Cargo.toml to bump the |
8568844
to
7623ecc
Compare
Ok, rebased again. |
feat(headers): Add Content-Disposition header
\o/ |
fixes #561
This is fairly extensive and would benefit from some review.
It does not try to interpret language-tags (rfc 5646) but rather accepts any string (for now).