feat(upgrade): Moved HTTP upgrades off Body to a new API (#2337)
Closes #2086 BREAKING CHANGE: The method `Body::on_upgrade()` is gone. It is essentially replaced with `hyper::upgrade::on(msg)`.
This commit is contained in:
@@ -1790,9 +1790,7 @@ mod dispatch_impl {
|
||||
let res = rt.block_on(future::join(res, rx).map(|r| r.0)).unwrap();
|
||||
|
||||
assert_eq!(res.status(), 101);
|
||||
let upgraded = rt
|
||||
.block_on(res.into_body().on_upgrade())
|
||||
.expect("on_upgrade");
|
||||
let upgraded = rt.block_on(hyper::upgrade::on(res)).expect("on_upgrade");
|
||||
|
||||
let parts = upgraded.downcast::<DebugStream>().unwrap();
|
||||
assert_eq!(s(&parts.read_buf), "foobar=ready");
|
||||
|
||||
Reference in New Issue
Block a user