diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-10-07 13:46:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-07 13:46:56 -0400 |
commit | c60d4f46a07dc00d4afeb7c61b2051dedbee7bb1 (patch) | |
tree | 6b117e947285c42524e27483a14bdc70ce47e7aa | |
parent | 37ab273c826eb8b74882362db4584657fb448bb5 (diff) | |
parent | a1acd293392df28e0261734cf5ff83ba95bd7e32 (diff) | |
download | servo-c60d4f46a07dc00d4afeb7c61b2051dedbee7bb1.tar.gz servo-c60d4f46a07dc00d4afeb7c61b2051dedbee7bb1.zip |
Auto merge of #24378 - otaviopace:fix/responses-status-code-text, r=jdm
response: remove text from default statusCode
According to the [specification](https://fetch.spec.whatwg.org/#concept-response-status-message) the text of the default statusCode text should be empty.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24371
<!-- Either: -->
- [x] These changes do not require tests because it is a simple string change that having tests would just be useless
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24378)
<!-- Reviewable:end -->
-rw-r--r-- | components/script/dom/response.rs | 4 |
1 files 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()), } } |