wip: feat: define response body enum

This commit is contained in:
Jun Kurihara 2023-12-12 19:58:33 +09:00
commit 008b62a925
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
12 changed files with 215 additions and 104 deletions

View file

@ -138,7 +138,6 @@ where
});
let new_req: Request<IncomingOr<IncomingLike>> = Request::from_parts(req_parts, IncomingOr::Right(req_body));
// Response<IncomingOr<BoxBody>> wrapped by RpxyResult
let res = self
.message_handler
.handle_request(

View file

@ -5,7 +5,7 @@ use crate::{
error::*,
globals::Globals,
hyper_ext::{
body::{BoxBody, IncomingOr},
body::{IncomingOr, ResponseBody},
rt::LocalExecutor,
},
log::*,
@ -32,7 +32,7 @@ async fn serve_request<U, T>(
listen_addr: SocketAddr,
tls_enabled: bool,
tls_server_name: Option<ServerName>,
) -> RpxyResult<Response<IncomingOr<BoxBody>>>
) -> RpxyResult<Response<ResponseBody>>
where
T: Send + Sync + Connect + Clone,
U: CryptoSource + Clone,