Skip to content

Specify range of valid HTTP response codes #849

@wingo

Description

@wingo

What is the domain of wasi:http/response#set-status-code ?

RFC 9110 specifies the set of HTTP status codes, divided in 5 blocks (100-199, 200-299, 300-399, 400-499, 500-599), and specifies that new status codes should fall in those blocks.

Proposal: codes should be in the range 100-599.

FWIW, Rust's http crate allows 100-999, while "discouraging" codes 600 or above: https://github.com/hyperium/http/blob/master/src/status.rs#L73.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-httpProposal: wasi-http

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions