diff --git a/actix-protobuf/CHANGES.md b/actix-protobuf/CHANGES.md index 8b88dc423..789133f17 100644 --- a/actix-protobuf/CHANGES.md +++ b/actix-protobuf/CHANGES.md @@ -1,6 +1,8 @@ # Changes ## Unreleased - 2022-xx-xx +- Added `application/x-protobuf` as an acceptable header. +- Updated `prost` dependency to `0.11`. ## 0.8.0 - 2022-06-25 diff --git a/actix-protobuf/Cargo.toml b/actix-protobuf/Cargo.toml index 6a5d3a44a..b55796e7c 100644 --- a/actix-protobuf/Cargo.toml +++ b/actix-protobuf/Cargo.toml @@ -20,8 +20,8 @@ path = "src/lib.rs" actix-web = { version = "4", default_features = false } derive_more = "0.99.5" futures-util = { version = "0.3.7", default-features = false } -prost = { version = "0.10", default_features = false } +prost = { version = "0.11", default_features = false } [dev-dependencies] actix-web = { version = "4", default_features = false, features = ["macros"] } -prost = { version = "0.10", default_features = false, features = ["prost-derive"] } +prost = { version = "0.11", default_features = false, features = ["prost-derive"] } diff --git a/actix-protobuf/src/lib.rs b/actix-protobuf/src/lib.rs index 8f13f9c8f..f7a8bedcb 100644 --- a/actix-protobuf/src/lib.rs +++ b/actix-protobuf/src/lib.rs @@ -172,7 +172,9 @@ pub struct ProtoBufMessage { impl ProtoBufMessage { /// Create `ProtoBufMessage` for request. pub fn new(req: &HttpRequest, payload: &mut Payload) -> Self { - if req.content_type() != "application/protobuf" { + if req.content_type() != "application/protobuf" + && req.content_type() != "application/x-protobuf" + { return ProtoBufMessage { limit: 262_144, length: None,