Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`Request`'s `Headers` fails to be constructed with an array or an object #13758
Comments
bors-servo
added a commit
that referenced
this issue
Nov 7, 2016
Allow Request's Headers to be created with various objects <!-- Please describe your changes on the following line: --> While Headers could be constructed correctly with an array or object (open ended dictionary/MozMap), Request's Headers failed to be created with non-Headers object (such as array or open ended dictionary/MozMap). Before, Request's Headers could be filled with only a Headers object in Step 28. This has been expanded to accommodate array and open ended dictionary. Step 29 empties the Request's Headers list after it had been filled in Step 28, thus resulting in an empty Headers object when it shouldn't be. This step has been removed with a comment in this commit. If a RequestInit Headers is _not_ given, but a RequestInfo Headers is given, RequestInfo Headers should be used to construct Request Headers. That step has been added after Step 31. Corresponding wpt result is updated in this commit. --- <!-- 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 - [X] These changes fix #13758 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13802) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Nov 8, 2016
Allow Request's Headers to be created with various objects <!-- Please describe your changes on the following line: --> While Headers could be constructed correctly with an array or object (open ended dictionary/MozMap), Request's Headers failed to be created with non-Headers object (such as array or open ended dictionary/MozMap). Before, Request's Headers could be filled with only a Headers object in Step 28. This has been expanded to accommodate array and open ended dictionary. Step 29 empties the Request's Headers list after it had been filled in Step 28, thus resulting in an empty Headers object when it shouldn't be. This step has been removed with a comment in this commit. If a RequestInit Headers is _not_ given, but a RequestInfo Headers is given, RequestInfo Headers should be used to construct Request Headers. That step has been added after Step 31. Corresponding wpt result is updated in this commit. --- <!-- 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 - [X] These changes fix #13758 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13802) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Nov 9, 2016
Allow Request's Headers to be created with various objects <!-- Please describe your changes on the following line: --> While Headers could be constructed correctly with an array or object (open ended dictionary/MozMap), Request's Headers failed to be created with non-Headers object (such as array or open ended dictionary/MozMap). Before, Request's Headers could be filled with only a Headers object in Step 28. This has been expanded to accommodate array and open ended dictionary. Step 29 empties the Request's Headers list after it had been filled in Step 28, thus resulting in an empty Headers object when it shouldn't be. This step has been removed with a comment in this commit. If a RequestInit Headers is _not_ given, but a RequestInfo Headers is given, RequestInfo Headers should be used to construct Request Headers. That step has been added after Step 31. Corresponding wpt result is updated in this commit. --- <!-- 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 - [X] These changes fix #13758 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13802) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From
tests/wpt/web-platform-tests/fetch/api/request/request-headers.html, following test fails:request1is constructed with the expected headers.request2andrequest3get constructed, but the headers remain empty. This is (probably) somewhat related to the other failing test in the same file: