elliottt requested alexcrichton for a review on PR #7591.
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 theContent-Length
header.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt requested wasmtime-core-reviewers for a review on PR #7591.
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 theContent-Length
header.Addresses https://github.com/WebAssembly/wasi-http/issues/83
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt requested pchickey for a review on PR #7591.
elliottt updated PR #7591.
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 theContent-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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
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 theContent-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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
elliottt updated PR #7591.
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 theContent-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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
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.
elliottt merged PR #7591.
Last updated: Dec 23 2024 at 12:05 UTC