From a1acd293392df28e0261734cf5ff83ba95bd7e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Pace?= Date: Sat, 5 Oct 2019 12:56:16 -0300 Subject: [PATCH] response: remove text from default statusCode According to the specification the text of the default statusCode should be empty. Reference: https://fetch.spec.whatwg.org/#concept-response-status-message --- components/script/dom/response.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/script/dom/response.rs b/components/script/dom/response.rs index 7dfa24439fc..ec139bf4a9e 100644 --- a/components/script/dom/response.rs +++ b/components/script/dom/response.rs @@ -58,7 +58,7 @@ impl Response { mime_type: DomRefCell::new("".to_string().into_bytes()), body_used: Cell::new(false), status: DomRefCell::new(Some(StatusCode::OK)), - raw_status: DomRefCell::new(Some((200, b"OK".to_vec()))), + raw_status: DomRefCell::new(Some((200, b"".to_vec()))), response_type: DomRefCell::new(DOMResponseType::Default), url: DomRefCell::new(None), url_list: DomRefCell::new(vec![]), @@ -313,7 +313,7 @@ impl ResponseMethods for Response { fn StatusText(&self) -> ByteString { match *self.raw_status.borrow() { Some((_, ref st)) => ByteString::new(st.clone()), - None => ByteString::new(b"OK".to_vec()), + None => ByteString::new(b"".to_vec()), } }