Age | Commit message (Collapse) | Author |
|
Check for expected headers more rigorously and check that it's a
HTTP/1.1 GET request. The logic mirrors what Deno Deploy and the
tungstenite crate do.
The presence of "Sec-Websocket-Version: 13" is now also enforced.
I don't expect that to break anything: conforming clients already
send it and tungstenite can't talk to older clients anyway.
The new code is more efficient due to heap-allocating less and aligns
more closely with the checks in ext/http/01_http.js now.
|
|
|
|
(#11717)
This commit adds a test case for "Http: connection closed before
message completed" error as well as fixing an edge with resource
leak when the error is raised.
|
|
* refactor(ops): return BadResource errors in ResourceTable calls
Instead of relying on callers to map Options to Results via `.ok_or_else(bad_resource_id)` at over 176 different call sites ...
|
|
This stood out on a flamegraph, it took up ~1% of a profiled loadtest of `cli/bench/deno_http_native.js`
|
|
cleanup(ext/http): simplify cookie header handling
Use `Vec::join` instead of essentially reimplementing it. There should be no meaningful performance delta
|
|
* cleanup(ext/http): simplify op_http_request_next
Keep op_http_request_next's high-level logic simple, factor out NextRequestResponse building to prepare_next_request() for improved readability & maintainability
* cleanup(ext/http): break prepare_next_request() into meaningful sub-funcs
|
|
Co-authored-by: Luca Casonato <hello@lcas.dev>
|
|
|
|
|