Expand accepted content types for JSON requests (#378)

* Expand accepted content types for JSON requests

Fixes https://github.com/tokio-rs/axum/issues/375

* changelog

* add test for content type without spaces

* Don't accept `text/json`

* small clean up
This commit is contained in:
David Pedersen
2021-10-08 14:51:22 +00:00
committed by GitHub
parent fe4c0ae386
commit ce5834ab80
4 changed files with 60 additions and 5 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ members = ["examples/*"]
default = ["http1", "json", "tower-log"]
http1 = ["hyper/http1"]
http2 = ["hyper/http2"]
json = ["serde_json"]
json = ["serde_json", "mime"]
multipart = ["multer", "mime"]
tower-log = ["tower/log"]
ws = ["tokio-tungstenite", "sha-1", "base64"]