mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fill r's headers with headers_copy when HeadersInit::Headers is given
Instead of filling request's headers whenever a `HeadersInit` is given, this patch fills request's headers only when `HeadersInit` with a type of `Headers` is given. Previously, the constructor tried to fill request's headers with itself, causing Servo to crash.
This commit is contained in:
parent
e821da81ce
commit
bfd999f71e
1 changed files with 2 additions and 1 deletions
|
@ -361,7 +361,8 @@ impl Request {
|
|||
try!(r.Headers().fill(Some(HeadersInit::Headers(input_request.Headers()))));
|
||||
}
|
||||
},
|
||||
Some(_) => try!(r.Headers().fill(Some(HeadersInit::Headers(headers_copy)))),
|
||||
Some(HeadersInit::Headers(_)) => try!(r.Headers().fill(Some(HeadersInit::Headers(headers_copy)))),
|
||||
_ => {},
|
||||
}
|
||||
|
||||
// Step 32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue