You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
In the abstract it is better to use a field for that purpose, as fields are the extensible part of a response. Obviously if the use of e.g. 999 is widely-deployed we probably need to support it.
Activity
wasi:http: Restrict valid set of HTTP response codes to 100-599
wasi:http: Restrict valid set of HTTP response codes to 100-599
wasi:http: Restrict valid set of HTTP response codes to 100-599 (#12149)
wasi:http: Restrict valid set of HTTP response codes to 100-599 (#12149)
wasi:http: Restrict valid set of HTTP response codes to 100-599 (#12149)
igrep commentedon Dec 10, 2025
Doesn't it need to accept unofficially used status codes (such as 999)?
wingo commentedon Dec 11, 2025
In the abstract it is better to use a field for that purpose, as fields are the extensible part of a response. Obviously if the use of e.g. 999 is widely-deployed we probably need to support it.
Interestingly I just read WhatWG fetch's specification, which allows 0..=999: https://fetch.spec.whatwg.org/#concept-status
I still think 100..-=599 is the right choice though if we manage to make it stick.
yoshuawuyts commentedon Dec 16, 2025
cc/ @WebAssembly/wasi-http-champions