hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.07k stars 1.55k forks source link

Panic in `UpgradeableConnection` due to `unwrap` #3626

Closed DDtKey closed 2 months ago

DDtKey commented 2 months ago

Version 1.x.x & current master (203d1b090d0d0349c7e373e881ac4ddba72129be)

Platform Seems doesn't matter

Description

I encountered a panic for http/1 connection:

panic was raised: panicked at .../src/server/conn/http1.rs:504:56

I.e this line has panicked due to unwrap https://github.com/hyperium/hyper/blob/203d1b090d0d0349c7e373e881ac4ddba72129be/src/server/conn/http1.rs#L504

I wasn't manage to build an MRE yet, but the issue is worth filling out

Btw, it's already second panic due to unwrapping after 1.x release (see #3615). I think the use of unwrap should be given more attention