Use data_url::Mime to parse the MIME Types#27725
Conversation
fcc1cea to
390e456
Compare
|
☔ The latest upstream changes (presumably #27726) made this pull request unmergeable. Please resolve the merge conflicts. |
390e456 to
55804da
Compare
|
☔ The latest upstream changes (presumably #27728) made this pull request unmergeable. Please resolve the merge conflicts. |
55804da to
7602350
Compare
|
☔ The latest upstream changes (presumably #27730) made this pull request unmergeable. Please resolve the merge conflicts. |
jdm
left a comment
There was a problem hiding this comment.
These changes look sensible! Thanks!
| /// <https://xhr.spec.whatwg.org/#response-mime-type> | ||
| fn response_mime_type(&self) -> Option<Mime> { | ||
| return extract_mime_type(&self.response_headers.borrow()) | ||
| .map(|mime_as_bytes| String::from_utf8(mime_as_bytes).unwrap().parse().ok()) |
There was a problem hiding this comment.
Let's use unwrap_or_default() instead.
components/script/dom/headers.rs
Outdated
| continue; | ||
| } | ||
|
|
||
| let temp_charset = &temp_mime.get_parameter(&"charset".to_string()); |
There was a problem hiding this comment.
The to_string shouldn't be necessary, I believe.
7602350 to
e1be1f4
Compare
|
I rebased the branch. |
e1be1f4 to
a31e300
Compare
|
Looks like a |
a31e300 to
3b1406d
Compare
|
My bad :-/ Fixed |
|
☔ The latest upstream changes (presumably #27763) made this pull request unmergeable. Please resolve the merge conflicts. |
3b1406d to
2b297a3
Compare
|
@bors-servo r+ |
|
📌 Commit 2b297a3 has been approved by |
Use data_url::Mime to parse the MIME Types This commit follows the spectification https://fetch.spec.whatwg.org/#concept-header-extract-mime-type This commit partially addresses #24923 (only the content type part). I'll try to fix the parser stuff in an other commit. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
💔 Test failed - status-taskcluster |
|
Done Should I open an issue to follow this "regression"? |
|
Yes please! |
Use data_url::Mime to parse the MIME Types This commit follows the spectification https://fetch.spec.whatwg.org/#concept-header-extract-mime-type This commit partially addresses #24923 (only the content type part). I'll try to fix the parser stuff in an other commit. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
☔ The latest upstream changes (presumably #27779) made this pull request unmergeable. Please resolve the merge conflicts. |
7fee619 to
43b3d93
Compare
|
Rebased |
|
@bors-servo r+ |
|
📌 Commit 43b3d93 has been approved by |
Use data_url::Mime to parse the MIME Types This commit follows the spectification https://fetch.spec.whatwg.org/#concept-header-extract-mime-type This commit partially addresses #24923 (only the content type part). I'll try to fix the parser stuff in an other commit. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
💔 Test failed - status-taskcluster |
For the Mac build :-/ |
|
Yeah, you have to look at the filtered summary instead (#25233). I believe those are known intermittent failures. @bors-servo retry |
|
☀️ Test successful - status-taskcluster |
This commit follows the spectification https://fetch.spec.whatwg.org/#concept-header-extract-mime-type
This commit partially addresses #24923 (only the content type part). I'll try to fix the parser stuff in an other commit.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors