mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix the webidl for Headers
Make the HeadersInit type match the spec. Fixes #26441
This commit is contained in:
parent
1a61937031
commit
c4273d86f2
6 changed files with 28 additions and 55 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use crate::body::{consume_body, consume_body_with_promise, BodyOperations, BodyType};
|
||||
use crate::dom::bindings::cell::{DomRefCell, Ref};
|
||||
use crate::dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
|
||||
use crate::dom::bindings::codegen::Bindings::HeadersBinding::HeadersMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::ResponseBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::ResponseBinding::{
|
||||
ResponseMethods, ResponseType as DOMResponseType,
|
||||
|
@ -335,9 +335,7 @@ impl ResponseMethods for Response {
|
|||
// Step 2
|
||||
let new_response = Response::new(&self.global());
|
||||
new_response.Headers().set_guard(self.Headers().get_guard());
|
||||
new_response
|
||||
.Headers()
|
||||
.fill(Some(HeadersInit::Headers(self.Headers())))?;
|
||||
new_response.Headers().copy_from_headers(self.Headers())?;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-response-clone
|
||||
// Instead of storing a net_traits::Response internally, we
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue