forked from mirrors/relay
Update actix betas
This commit is contained in:
parent
80bc838073
commit
f105c427dc
4 changed files with 272 additions and 239 deletions
486
Cargo.lock
generated
486
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "relay"
|
||||
description = "A simple activitypub relay"
|
||||
version = "0.2.14"
|
||||
version = "0.2.15"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
|
@ -15,14 +15,14 @@ build = "src/build.rs"
|
|||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
actix-rt = "2.0.2"
|
||||
actix-web = { version = "4.0.0-beta.4", default-features = false, features = ["compress"] }
|
||||
actix-webfinger = "0.4.0-beta.2"
|
||||
actix-web = { version = "4.0.0-beta.7", default-features = false, features = ["compress"] }
|
||||
actix-webfinger = "0.4.0-beta.3"
|
||||
activitystreams = "0.7.0-alpha.10"
|
||||
activitystreams-ext = "0.1.0-alpha.2"
|
||||
ammonia = "3.1.0"
|
||||
async-mutex = "1.0.1"
|
||||
async-rwlock = "1.3.0"
|
||||
awc = { version = "3.0.0-beta.3", default-features = false, features = ["rustls", "compress"] }
|
||||
awc = { version = "3.0.0-beta.6", default-features = false, features = ["rustls", "compress"] }
|
||||
background-jobs = "0.9.0"
|
||||
base64 = "0.13"
|
||||
chrono = "0.4.19"
|
||||
|
@ -30,7 +30,7 @@ config = "0.11.0"
|
|||
dotenv = "0.15.0"
|
||||
env_logger = "0.8.2"
|
||||
futures = "0.3.12"
|
||||
http-signature-normalization-actix = { version = "0.5.0-beta.1", default-features = false, features = ["sha-2"] }
|
||||
http-signature-normalization-actix = { version = "0.5.0-beta.6", default-features = false, features = ["sha-2"] }
|
||||
log = "0.4"
|
||||
lru = "0.6.0"
|
||||
mime = "0.3.16"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
use activitystreams::{error::DomainError, url::ParseError};
|
||||
use actix_web::{
|
||||
dev::Body,
|
||||
error::{BlockingError, ResponseError},
|
||||
http::StatusCode,
|
||||
BaseHttpResponse,
|
||||
HttpResponse,
|
||||
};
|
||||
use http_signature_normalization_actix::PrepareSignError;
|
||||
use log::error;
|
||||
|
@ -130,8 +129,8 @@ impl ResponseError for MyError {
|
|||
}
|
||||
}
|
||||
|
||||
fn error_response(&self) -> BaseHttpResponse<Body> {
|
||||
BaseHttpResponse::build(self.status_code())
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
HttpResponse::build(self.status_code())
|
||||
.insert_header(("Content-Type", "application/activity+json"))
|
||||
.body(
|
||||
serde_json::to_string(&serde_json::json!({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use actix_web::{
|
||||
dev::{Body, Payload, Service, ServiceRequest, Transform},
|
||||
dev::{Payload, Service, ServiceRequest, Transform},
|
||||
http::{Method, StatusCode},
|
||||
web::BytesMut,
|
||||
BaseHttpResponse, HttpMessage, ResponseError,
|
||||
HttpMessage, HttpResponse, ResponseError,
|
||||
};
|
||||
use futures::{
|
||||
future::{ok, LocalBoxFuture, Ready, TryFutureExt},
|
||||
|
@ -27,8 +27,8 @@ impl ResponseError for DebugError {
|
|||
StatusCode::BAD_REQUEST
|
||||
}
|
||||
|
||||
fn error_response(&self) -> BaseHttpResponse<Body> {
|
||||
BaseHttpResponse::new(self.status_code())
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
HttpResponse::new(self.status_code())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue