mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix dom-headers-get
This commit is contained in:
parent
7d1d387f3d
commit
68472fabf8
2 changed files with 4 additions and 11 deletions
|
@ -136,11 +136,10 @@ impl HeadersMethods for Headers {
|
|||
fn Get(&self, name: ByteString) -> Fallible<Option<ByteString>> {
|
||||
// Step 1
|
||||
let valid_name = validate_name(name)?;
|
||||
Ok(self
|
||||
.header_list
|
||||
.borrow()
|
||||
.get(HeaderName::from_str(&valid_name).unwrap())
|
||||
.map(|v| ByteString::new(v.as_bytes().to_vec())))
|
||||
Ok(
|
||||
get_value_from_header_list(&valid_name, &self.header_list.borrow())
|
||||
.map(|v| ByteString::new(v.as_bytes().to_vec())),
|
||||
)
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-headers-getsetcookie
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue