WebAssembly / WebAssembly/WASI

OutgoingBody finish content length errors

Open
#810 4 comments 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

When the written body is less than the content length, the only error code that fits is internal-error.

But when the written body is more than the content length, perhaps it would make sense to use the existing HTTP-request-body-size(option<u64>) error code which is meant to be for when the body is too long? Alternatively should this also be internal-error?

Then, for both of these, it would be nice to have a proper error code instead of making it an internal error. Perhaps a dedicated HTTP-request-body-content-length-invalid(option<u64>)?

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

No file or test is named. Start by tracing the OutgoingBody finish behavior and the existing HTTP-request-body-size and internal-error codes described in the issue; determine how short and long bodies should be represented, then settle and specify whether to reuse an existing code or add a dedicated content-length error.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
api, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.