Skip to content

Commit 67a9d79

Browse files
committed
fix: add support for extended content types
For example, `application/json; charset=utf-8` was not handled.
1 parent 98b1b3f commit 67a9d79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stackslib/src/net/http/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl FromStr for HttpContentType {
180180
Ok(HttpContentType::Bytes)
181181
} else if s == "text/plain" || s.starts_with("text/plain;") {
182182
Ok(HttpContentType::Text)
183-
} else if s == "application/json" {
183+
} else if s == "application/json" || s.starts_with("application/json;") {
184184
Ok(HttpContentType::JSON)
185185
} else {
186186
Err(CodecError::DeserializeError(format!(

0 commit comments

Comments
 (0)