File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
crates/wasi-http/src/p3/host Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -679,11 +679,13 @@ impl HostResponse for WasiHttpCtxView<'_> {
679679 status_code : StatusCode ,
680680 ) -> wasmtime:: Result < Result < ( ) , ( ) > > {
681681 let res = get_response_mut ( self . table , & res) ?;
682- let Ok ( status) = http:: StatusCode :: from_u16 ( status_code) else {
683- return Ok ( Err ( ( ) ) ) ;
684- } ;
685- res. status = status;
686- Ok ( Ok ( ( ) ) )
682+ match http:: StatusCode :: from_u16 ( status_code) {
683+ Ok ( status) if matches ! ( status_code, 100 ..=599 ) => {
684+ res. status = status;
685+ Ok ( Ok ( ( ) ) )
686+ }
687+ _ => Ok ( Err ( ( ) ) ) ,
688+ }
687689 }
688690
689691 fn get_headers ( & mut self , res : Resource < Response > ) -> wasmtime:: Result < Resource < Headers > > {
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ use wit_component::ComponentEncoder;
1616
1717const KNOWN_FAILURES : & [ & str ] = & [
1818 "filesystem-hard-links" ,
19- "http-response" ,
2019 "filesystem-read-directory" ,
2120 // FIXME(#11524)
2221 "remove_directory_trailing_slashes" ,
You can’t perform that action at this time.
0 commit comments