bug 1507428: webdriver: fix incorrect Content-Type header; r=whimboo
authorAndreas Tolfsen <ato@sny.no>
Fri, 16 Nov 2018 19:17:37 +0000
changeset 506042 b6010c470851c2a92036ae40c76665048575a20c
parent 506041 aef6ff7f100d7b6748020d3c83f1303cf084e0a6
child 506043 1e6a2dbfa104081bed1a4273aff4cbd2c29d3335
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1507428
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1507428: webdriver: fix incorrect Content-Type header; r=whimboo The Content-Type header contains the correct MIME type, but the charset option is "utf8" and invalid: it should be "utf-8". Differential Revision: https://phabricator.services.mozilla.com/D12116
testing/webdriver/src/server.rs
--- a/testing/webdriver/src/server.rs
+++ b/testing/webdriver/src/server.rs
@@ -221,17 +221,17 @@ impl<U: WebDriverExtensionRoute + 'stati
                 }
                 Err(e) => (e.http_status(), serde_json::to_string(&e).unwrap()),
             };
 
             debug!("<- {} {}", status, resp_body);
 
             let response = Response::builder()
                 .status(status)
-                .header(http::header::CONTENT_TYPE, "application/json; charset=utf8")
+                .header(http::header::CONTENT_TYPE, "application/json; charset=utf-8")
                 .header(http::header::CACHE_CONTROL, "no-cache")
                 .body(resp_body.into())
                 .unwrap();
 
             Ok(response)
         }))
     }
 }