Stream: git-wasmtime

Topic: wasmtime / PR #7591 Raise Http{Request,Response}BodyError...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 00:47):

elliottt requested alexcrichton for a review on PR #7591.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 00:47):

elliottt opened PR #7591 from elliottt:trevor/body-error to bytecodealliance:main:

Instead of InternalError, raise a more specific request or response body size error when the number of bytes written to the outgoing body doesn't match the expectation set by the Content-Length header.
<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 00:47):

elliottt requested wasmtime-core-reviewers for a review on PR #7591.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 00:48):

elliottt edited PR #7591:

Instead of InternalError, raise a more specific request or response body size error when the number of bytes written to the outgoing body doesn't match the expectation set by the Content-Length header.

Addresses https://github.com/WebAssembly/wasi-http/issues/83
<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 00:48):

elliottt requested pchickey for a review on PR #7591.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 00:55):

elliottt updated PR #7591.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 01:17):

elliottt edited PR #7591:

Instead of InternalError, raise a more specific request or response body size error when the number of bytes written to the outgoing body doesn't match the expectation set by the Content-Length header.

This does potentially overload the meaning of the http-{request,response}-body-size errors, as the previous error code was defined as meaning specifically that the body was too large, while this PR uses it to mean that the size didn't match the expected length.

Addresses https://github.com/WebAssembly/wasi-http/issues/83
<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 01:18):

elliottt edited PR #7591:

Instead of InternalError, raise a more specific request or response body size error when the number of bytes written to the outgoing body doesn't match the expectation set by the Content-Length header.

This change does overload the meaning of the http-{request,response}-body-size errors, as they were previously defined as meaning specifically that the body was too large, while this PR uses them to mean that the body length didn't match the expected length.

Addresses https://github.com/WebAssembly/wasi-http/issues/83
<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 01:26):

elliottt updated PR #7591.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 28 2023 at 01:34):

elliottt edited PR #7591:

Instead of InternalError, raise a more specific request or response body size error when the number of bytes written to the outgoing body doesn't match the expectation set by the Content-Length header.

This change does overload the meaning of the http-{request,response}-body-size errors, as they were previously defined as meaning specifically that the body was too large, while this PR uses them to mean that the body length didn't match the expected length.

Addresses https://github.com/WebAssembly/wasi-http/issues/83
<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 29 2023 at 18:47):

pchickey submitted PR review:

LGTM, We discussed the expected vs got payload in chat,

@elliottt :
| the original rfc says that the size should be the received size, not the expected size: https://www.rfc-editor.org/rfc/rfc9209#section-2.3.21.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 29 2023 at 19:50):

elliottt merged PR #7591.


Last updated: Dec 23 2024 at 12:05 UTC