mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Implement Headers.prototype.getSetCookie
This commit is contained in:
parent
9f98a1ed1a
commit
4ee3f575f6
3 changed files with 11 additions and 36 deletions
|
@ -155,6 +155,16 @@ impl HeadersMethods for Headers {
|
|||
.map(|v| ByteString::new(v.as_bytes().to_vec())))
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-headers-getsetcookie
|
||||
fn GetSetCookie(&self) -> Vec<ByteString> {
|
||||
self.header_list
|
||||
.borrow()
|
||||
.get_all("Set-Cookie")
|
||||
.iter()
|
||||
.map(|v| ByteString::new(v.as_bytes().to_vec()))
|
||||
.collect()
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-headers-has
|
||||
fn Has(&self, name: ByteString) -> Fallible<bool> {
|
||||
// Step 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue