WASI icon indicating copy to clipboard operation
WASI copied to clipboard

Document content length check is applied to outoing-body output-stream

Open guybedford opened this issue 2 years ago • 1 comments

In the current WIT definitions, outgoing-body finish defines that the content length must be validated against the actual length.

But, in addition to this, the Wasmtime implementation also throws a stream error from the output-stream for the outgoing-body as soon as a write is made that exceeds the expected content length. Thus this check is not only performed at finish but also dynamically with each write operation to the stream.

If this is the defined behaviour, it should be documented in the WIT.

guybedford avatar Nov 24 '23 02:11 guybedford