diff --git a/http-signature-normalization-actix/Cargo.toml b/http-signature-normalization-actix/Cargo.toml index 54d6ade..1d29cc1 100644 --- a/http-signature-normalization-actix/Cargo.toml +++ b/http-signature-normalization-actix/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "http-signature-normalization-actix" description = "An HTTP Signatures library that leaves the signing to you" -version = "0.5.0-beta.5" +version = "0.5.0-beta.6" authors = ["asonix "] license-file = "LICENSE" readme = "README.md" @@ -25,8 +25,8 @@ name = "client" required-features = ["sha-2"] [dependencies] -actix-web = { version = "4.0.0-beta.6", default-features = false } -awc = "3.0.0-beta.5" +actix-web = { version = "4.0.0-beta.7", default-features = false } +awc = "3.0.0-beta.6" base64 = { version = "0.13", optional = true } chrono = "0.4.6" futures = "0.3" diff --git a/http-signature-normalization-actix/src/digest/middleware.rs b/http-signature-normalization-actix/src/digest/middleware.rs index d0d299c..ea8b58f 100644 --- a/http-signature-normalization-actix/src/digest/middleware.rs +++ b/http-signature-normalization-actix/src/digest/middleware.rs @@ -2,10 +2,10 @@ use super::{DigestPart, DigestVerify}; use actix_web::{ - dev::{Body, MessageBody, Payload, Service, ServiceRequest, ServiceResponse, Transform}, + dev::{MessageBody, Payload, Service, ServiceRequest, ServiceResponse, Transform}, error::PayloadError, http::{header::HeaderValue, StatusCode}, - web, BaseHttpResponse, FromRequest, HttpMessage, HttpRequest, ResponseError, + web, FromRequest, HttpMessage, HttpRequest, HttpResponse, ResponseError, }; use futures::{channel::mpsc, Stream, StreamExt}; use log::{debug, warn}; @@ -211,7 +211,7 @@ impl ResponseError for VerifyError { StatusCode::BAD_REQUEST } - fn error_response(&self) -> BaseHttpResponse { - BaseHttpResponse::bad_request() + fn error_response(&self) -> HttpResponse { + HttpResponse::new(self.status_code()) } } diff --git a/http-signature-normalization-actix/src/middleware.rs b/http-signature-normalization-actix/src/middleware.rs index 8e239d1..9ad1629 100644 --- a/http-signature-normalization-actix/src/middleware.rs +++ b/http-signature-normalization-actix/src/middleware.rs @@ -2,9 +2,9 @@ use crate::{Config, PrepareVerifyError, SignatureVerify}; use actix_web::{ - dev::{Body, MessageBody, Payload, Service, ServiceRequest, ServiceResponse, Transform}, + dev::{MessageBody, Payload, Service, ServiceRequest, ServiceResponse, Transform}, http::StatusCode, - BaseHttpResponse, Error, FromRequest, HttpMessage, HttpRequest, ResponseError, + Error, FromRequest, HttpMessage, HttpRequest, HttpResponse, ResponseError, }; use log::{debug, warn}; use std::{ @@ -252,7 +252,7 @@ impl ResponseError for VerifyError { StatusCode::BAD_REQUEST } - fn error_response(&self) -> BaseHttpResponse { - BaseHttpResponse::bad_request() + fn error_response(&self) -> HttpResponse { + HttpResponse::new(self.status_code()) } }