1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

update to prost 0.11 (#279)

* updated to prost 0.11 and added application/x-protobuf

* updated derive-more, prost, futures-util versions

* updated Changelog and a small fix in Cargo.toml

* cargo fmt

* bumped version to 0.8.1

* removed version bump

* add back intentional patch versions

Co-authored-by: Ahmed Masud <ahmed.masud@saf.ai>
This commit is contained in:
Rob Ede 2022-08-24 18:07:13 +01:00 committed by GitHub
parent e61dbae860
commit 1e682e7a59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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"] }

View File

@ -172,7 +172,9 @@ pub struct ProtoBufMessage<T: Message + Default> {
impl<T: Message + Default> ProtoBufMessage<T> {
/// 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,