File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ use http::{
14
14
use http_body_util:: BodyExt ;
15
15
use hyper:: {
16
16
body:: { Bytes , Incoming } ,
17
- server:: conn:: http1,
18
17
service:: service_fn,
19
18
} ;
20
- use hyper_util:: rt:: TokioIo ;
19
+ use hyper_util:: {
20
+ rt:: { TokioExecutor , TokioIo } ,
21
+ server:: conn:: auto:: Builder ,
22
+ } ;
21
23
use spin_app:: { APP_DESCRIPTION_KEY , APP_NAME_KEY } ;
22
24
use spin_factor_outbound_http:: { OutboundHttpFactor , SelfRequestOrigin } ;
23
25
use spin_factors:: RuntimeFactors ;
@@ -410,8 +412,7 @@ impl<F: RuntimeFactors> HttpServer<F> {
410
412
client_addr : SocketAddr ,
411
413
) {
412
414
task:: spawn ( async move {
413
- if let Err ( err) = http1:: Builder :: new ( )
414
- . keep_alive ( true )
415
+ if let Err ( err) = Builder :: new ( TokioExecutor :: new ( ) )
415
416
. serve_connection (
416
417
TokioIo :: new ( stream) ,
417
418
service_fn ( move |request| {
You can’t perform that action at this time.
0 commit comments