diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-30 12:36:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-30 12:36:49 -0500 |
commit | 1ce4be8f6de3291a1576a68e57d370ddf465ab3b (patch) | |
tree | 9b2f5a413f9a81c2c6cad9ce6c4451ba37924691 /components/script/dom/bindings/codegen/parser/update.sh | |
parent | 2553bb7af4f3f5cd0b3df5431a21e080e42f5f72 (diff) | |
parent | e631d3a5f6aa251b5694ee56af29009bfb97e4f2 (diff) | |
download | servo-1ce4be8f6de3291a1576a68e57d370ddf465ab3b.tar.gz servo-1ce4be8f6de3291a1576a68e57d370ddf465ab3b.zip |
Auto merge of #12634 - malisas:malisa-headersAPI, r=jdm
Headers API constructor and methods
<!-- Please describe your changes on the following line: -->
This PR fills out the constructor and the delete, get, has, and set methods for the Headers API. Addresses issue #11897 .
The PR also rewrites the append method to support `hyper::header::Headers`'s HashMap `insert` method, which overwrites entries instead of appending.
As a result of this, for a given header name there is at most one value in the inner "header list"/HashMap. Multiple values for the same name are comma-delimited.
There are still a few TODOs:
- Support `OpenEndedDictionary<ByteString>` as a possible `HeadersInit` value. [OpenEndedDictionary<T> is a future IDL construct.](https://fetch.spec.whatwg.org/#headers-class)
- Support `iterable<ByteString, ByteString>`. Related issue: #12628
- Values are comma-delimited, except for values with the name `set-cookie`, which are newline-delimited. This is because values for `set-cookie` are [allowed to contain](https://tools.ietf.org/html/rfc7230#section-3.2.2) inner commas. This violates the [spec](https://fetch.spec.whatwg.org/#concept-header-value-combined).
- The TODOs from PR #12467 regarding value parsing also still need to be resolved.
---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because tests for the Headers API already exists, but this commit does not implement the interface fully. The tests will fail.
<!-- 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/12634)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser/update.sh')
0 files changed, 0 insertions, 0 deletions