This commit is contained in:
Rob Ede 2021-12-06 14:56:52 +00:00
parent 5a9ca6eeb3
commit 9569860940
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ use std::{
use actix_http::{ use actix_http::{
body::{self, BodyStream, BoxBody, SizedStream}, 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_http_test::test_server;
use actix_rt::time::sleep; use actix_rt::time::sleep;
@ -748,7 +748,7 @@ async fn test_h1_on_connect() {
data.insert(20isize); data.insert(20isize);
}) })
.h1(|req: Request| { .h1(|req: Request| {
assert!(req.extensions().contains::<isize>()); assert!(req.conn_data::<isize>().is_some());
ok::<_, Infallible>(Response::ok()) ok::<_, Infallible>(Response::ok())
}) })
.tcp() .tcp()