fix(ext/http): Ensure cancelled requests don't crash Deno.serve (#19154)

Fixes for various `Attemped to access invalid request` bugs (#19058,
#15427, #17213).

We did not wait for both a drop event and a completion event before
removing items from the slab table. This ensures that we do so.

In addition, the slab methods are refactored out into `slab.rs` for
maintainability.
This commit is contained in:
Matt Mastracci 2023-05-16 17:00:59 -06:00 committed by GitHub
parent 9ba2c4c42f
commit a22388bbd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 416 additions and 313 deletions

View file

@ -81,6 +81,7 @@ mod reader_stream;
mod request_body;
mod request_properties;
mod response_body;
mod slab;
mod websocket_upgrade;
pub use request_properties::DefaultHttpPropertyExtractor;