1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

update actix-service dep

This commit is contained in:
Nikolay Kim
2019-12-22 16:39:25 +04:00
parent f45db1f909
commit c7f3915779
16 changed files with 76 additions and 101 deletions

View File

@ -2,13 +2,9 @@ use std::marker::PhantomData;
use std::sync::{Arc, Mutex};
use std::{fmt, io, net};
use actix_http::{
body::MessageBody, Error, HttpService, KeepAlive, Request, Response,
};
use actix_http::{body::MessageBody, Error, HttpService, KeepAlive, Request, Response};
use actix_server::{Server, ServerBuilder};
use actix_service::{
map_config, IntoServiceFactory, Service, ServiceFactory,
};
use actix_service::{map_config, IntoServiceFactory, Service, ServiceFactory};
use net2::TcpBuilder;
@ -266,7 +262,7 @@ where
.keep_alive(c.keep_alive)
.client_timeout(c.client_timeout)
.local_addr(addr)
.finish(map_config(factory().into_factory(), move |_| cfg.clone()))
.finish(map_config(factory(), move |_| cfg.clone()))
.tcp()
},
)?;
@ -313,7 +309,7 @@ where
.keep_alive(c.keep_alive)
.client_timeout(c.client_timeout)
.client_disconnect(c.client_shutdown)
.finish(map_config(factory().into_factory(), move |_| cfg.clone()))
.finish(map_config(factory(), move |_| cfg.clone()))
.openssl(acceptor.clone())
},
)?;
@ -360,7 +356,7 @@ where
.keep_alive(c.keep_alive)
.client_timeout(c.client_timeout)
.client_disconnect(c.client_shutdown)
.finish(map_config(factory().into_factory(), move |_| cfg.clone()))
.finish(map_config(factory(), move |_| cfg.clone()))
.rustls(config.clone())
},
)?;
@ -483,9 +479,7 @@ where
HttpService::build()
.keep_alive(c.keep_alive)
.client_timeout(c.client_timeout)
.finish(map_config(factory().into_factory(), move |_| {
config.clone()
})),
.finish(map_config(factory(), move |_| config.clone())),
)
})?;
Ok(self)
@ -527,9 +521,7 @@ where
HttpService::build()
.keep_alive(c.keep_alive)
.client_timeout(c.client_timeout)
.finish(map_config(factory().into_factory(), move |_| {
config.clone()
})),
.finish(map_config(factory(), move |_| config.clone())),
)
},
)?;

View File

@ -634,7 +634,7 @@ where
AppConfig::new(false, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.h1(map_config(factory().into_factory(), move |_| cfg.clone()))
.h1(map_config(factory(), move |_| cfg.clone()))
.tcp()
}),
HttpVer::Http2 => builder.listen("test", tcp, move || {
@ -642,7 +642,7 @@ where
AppConfig::new(false, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.h2(map_config(factory().into_factory(), move |_| cfg.clone()))
.h2(map_config(factory(), move |_| cfg.clone()))
.tcp()
}),
HttpVer::Both => builder.listen("test", tcp, move || {
@ -650,9 +650,7 @@ where
AppConfig::new(false, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.finish(map_config(factory().into_factory(), move |_| {
cfg.clone()
}))
.finish(map_config(factory(), move |_| cfg.clone()))
.tcp()
}),
},
@ -663,7 +661,7 @@ where
AppConfig::new(true, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.h1(map_config(factory().into_factory(), move |_| cfg.clone()))
.h1(map_config(factory(), move |_| cfg.clone()))
.openssl(acceptor.clone())
}),
HttpVer::Http2 => builder.listen("test", tcp, move || {
@ -671,7 +669,7 @@ where
AppConfig::new(true, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.h2(map_config(factory().into_factory(), move |_| cfg.clone()))
.h2(map_config(factory(), move |_| cfg.clone()))
.openssl(acceptor.clone())
}),
HttpVer::Both => builder.listen("test", tcp, move || {
@ -679,9 +677,7 @@ where
AppConfig::new(true, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.finish(map_config(factory().into_factory(), move |_| {
cfg.clone()
}))
.finish(map_config(factory(), move |_| cfg.clone()))
.openssl(acceptor.clone())
}),
},
@ -692,7 +688,7 @@ where
AppConfig::new(true, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.h1(map_config(factory().into_factory(), move |_| cfg.clone()))
.h1(map_config(factory(), move |_| cfg.clone()))
.rustls(config.clone())
}),
HttpVer::Http2 => builder.listen("test", tcp, move || {
@ -700,7 +696,7 @@ where
AppConfig::new(true, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.h2(map_config(factory().into_factory(), move |_| cfg.clone()))
.h2(map_config(factory(), move |_| cfg.clone()))
.rustls(config.clone())
}),
HttpVer::Both => builder.listen("test", tcp, move || {
@ -708,9 +704,7 @@ where
AppConfig::new(true, local_addr, format!("{}", local_addr));
HttpService::build()
.client_timeout(ctimeout)
.finish(map_config(factory().into_factory(), move |_| {
cfg.clone()
}))
.finish(map_config(factory(), move |_| cfg.clone()))
.rustls(config.clone())
}),
},