0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/tests
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
..
integration refactor: deno_graph 0.43 upgrade (#17692) 2023-02-09 22:00:23 -05:00
testdata fix(cli/graph_util): don't append referrer info for root module errors (#17730) 2023-02-11 10:36:29 -05:00
unit fix(ext/flash): Always send correct number of bytes when handling HEAD requests (#17740) 2023-02-12 16:13:05 +05:30
integration_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00