mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Merge pull request #2765 from Manishearth/xhr-wpt-encoding
Fix encoding issues for getResponseHeader()
This commit is contained in:
commit
0974d21bcd
2 changed files with 2 additions and 6 deletions
|
@ -556,7 +556,8 @@ impl<'a> XMLHttpRequestMethods<'a> for JSRef<'a, XMLHttpRequest> {
|
|||
self.filter_response_headers().iter().find(|h| {
|
||||
name.eq_ignore_case(&FromStr::from_str(h.header_name().as_slice()).unwrap())
|
||||
}).map(|h| {
|
||||
FromStr::from_str(h.header_value().as_slice()).unwrap()
|
||||
// rust-http doesn't decode properly, we'll convert it back to bytes here
|
||||
ByteString::new(h.header_value().as_slice().chars().map(|c| { assert!(c <= '\u00FF'); c as u8 }).collect())
|
||||
})
|
||||
}
|
||||
fn GetAllResponseHeaders(&self) -> ByteString {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue