WebAssembly / WebAssembly/WASI

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

Open
#809 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-http S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the WIT definition for outgoing-body and its finish operation, then compare it with the Wasmtime output-stream behavior described in the issue. If write-time content-length validation is intended, document that behavior in the relevant WIT definition and verify the wording against the implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.