mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 15:07:42 +02:00
add connection level data container (#2491)
This commit is contained in:
@ -7,7 +7,7 @@ use std::{
|
||||
|
||||
use actix_http::{
|
||||
body::{self, BodyStream, BoxBody, SizedStream},
|
||||
header, Error, HttpMessage, HttpService, KeepAlive, Request, Response, StatusCode,
|
||||
header, Error, HttpService, KeepAlive, Request, Response, StatusCode,
|
||||
};
|
||||
use actix_http_test::test_server;
|
||||
use actix_rt::time::sleep;
|
||||
@ -748,7 +748,7 @@ async fn test_h1_on_connect() {
|
||||
data.insert(20isize);
|
||||
})
|
||||
.h1(|req: Request| {
|
||||
assert!(req.extensions().contains::<isize>());
|
||||
assert!(req.conn_data::<isize>().is_some());
|
||||
ok::<_, Infallible>(Response::ok())
|
||||
})
|
||||
.tcp()
|
||||
|
Reference in New Issue
Block a user