Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

wasi-http: map `http-response-header-size` to the response variant (#14567)

Xia Chaoe57e3ac1cb45
diff --git a/crates/wasi-http/src/p2/error.rs b/crates/wasi-http/src/p2/error.rs
index cd51fefa19..5423474cc1 100644
--- a/crates/wasi-http/src/p2/error.rs
+++ b/crates/wasi-http/src/p2/error.rs
@@ -245,7 +245,7 @@ impl From<ErrorCode> for Error {
ErrorCode::HttpResponseHeaderSectionSize(payload) => {
Self::HttpResponseHeaderSectionSize(payload)
}
- ErrorCode::HttpResponseHeaderSize(payload) => Self::HttpRequestHeaderSize {
+ ErrorCode::HttpResponseHeaderSize(payload) => Self::HttpResponseHeaderSize {
field_name: payload.field_name,
field_size: payload.field_size,
},
diff --git a/crates/wasi-http/src/p3/conv.rs b/crates/wasi-http/src/p3/conv.rs
index 1753b4872e..e05cc80aa7 100644
--- a/crates/wasi-http/src/p3/conv.rs
+++ b/crates/wasi-http/src/p3/conv.rs
@@ -64,7 +64,7 @@ impl From<ErrorCode> for Error {
ErrorCode::HttpResponseHeaderSectionSize(payload) => {
Self::HttpResponseHeaderSectionSize(payload)
}
- ErrorCode::HttpResponseHeaderSize(payload) => Self::HttpRequestHeaderSize {
+ ErrorCode::HttpResponseHeaderSize(payload) => Self::HttpResponseHeaderSize {
field_name: payload.field_name,
field_size: payload.field_size,
},