deno/ext
Kamil Ogórek d4e5a295f2
fix(ext/flash): Always send correct number of bytes when handling HEAD requests (#17740)
This was not caught in the previous test case, as the response body was
smaller than the size of `HEAD` response.
This made `nwritten < responseLen` check in `writeFixedResponse` to
fail, and not trigger `op_flash_respond_async` as a result.

When the response body is larger than the `HEAD` though, as in the
updated test case (`HEAD` i 120 bytes, where our response is 300 bytes),
it would think that we still have something to send, and effectively
panic, as `op_flash_respond` already removed the request from the pool.

This change, makes the `handleResponse` function always calculate the
number of bytes to transmit when `HEAD` request is encountered.
Effectively ignoring `Content-Length` of the body, but still setting it
correctly in the request header itself.

Fixes https://github.com/denoland/deno/issues/17737
2023-02-12 16:13:05 +05:30
..
broadcast_channel refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
cache refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
console fix(ext/console): Only right-align integers in console.table() (#17389) 2023-02-08 18:14:40 +09:00
crypto refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
fetch refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
ffi refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
flash fix(ext/flash): Always send correct number of bytes when handling HEAD requests (#17740) 2023-02-12 16:13:05 +05:30
http refactor(ext/http): use String.prototype.trim() instead of regex (#17722) 2023-02-10 19:41:20 +00:00
napi chore: forward v1.30.3 release commit to main (#17677) 2023-02-07 04:15:38 +00:00
net feat: add signal option to Deno.resolveDns (#17384) 2023-02-11 14:14:02 +00:00
node refactor: clean up "cli/node/mod.rs" and "ext/node" (#17713) 2023-02-10 10:26:39 -05:00
tls chore: forward v1.30.3 release commit to main (#17677) 2023-02-07 04:15:38 +00:00
url refactor(core): change SourcePair to ExtensionFileSource (#17686) 2023-02-08 00:21:43 +01:00
web refactor(core): change SourcePair to ExtensionFileSource (#17686) 2023-02-08 00:21:43 +01:00
webgpu fix(webgpu): use correct op for GPUDevice.createSampler (#17729) 2023-02-11 05:40:51 +00:00
webidl refactor(ext/webidl): use TypedArrayPrototypeGetSymbolToStringTag (#17602) 2023-02-09 22:45:47 +01:00
websocket refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
webstorage refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00