summaryrefslogtreecommitdiff
path: root/ext/http/http_next.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-01-26 10:33:55 -0500
committerGitHub <noreply@github.com>2024-01-26 15:33:55 +0000
commitc66f7b6d8d1d7481eee91d9ff898fd4eaddfdeea (patch)
tree7a79cf5b78ade0e8335a3c0800bd817601839f04 /ext/http/http_next.rs
parent98c537726e7a2bf8e9b4d339b853e8fdfba3f658 (diff)
fix(ext/http): smarter handling of Accept-Encoding (#22130)
Diffstat (limited to 'ext/http/http_next.rs')
-rw-r--r--ext/http/http_next.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/http/http_next.rs b/ext/http/http_next.rs
index a58c5f09a..e8c7ffbcc 100644
--- a/ext/http/http_next.rs
+++ b/ext/http/http_next.rs
@@ -558,11 +558,11 @@ fn is_request_compressible(
return Compression::None;
};
- match accept_encoding.to_str().unwrap() {
+ match accept_encoding.to_str() {
// Firefox and Chrome send this -- no need to parse
- "gzip, deflate, br" => return Compression::Brotli,
- "gzip" => return Compression::GZip,
- "br" => return Compression::Brotli,
+ Ok("gzip, deflate, br") => return Compression::Brotli,
+ Ok("gzip") => return Compression::GZip,
+ Ok("br") => return Compression::Brotli,
_ => (),
}