Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 69386e8

Browse files
committed
fix: propagate is-forbidden-header calls to wrapped context
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
1 parent 485bbed commit 69386e8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

crates/wasi-http/src/p3/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ impl<T: WasiHttpView> WasiHttpView for &mut T {
349349
fn http(&self) -> &WasiHttpCtx<Self::Client> {
350350
(**self).http()
351351
}
352+
353+
fn is_forbidden_header(&mut self, name: &http::header::HeaderName) -> bool {
354+
(**self).is_forbidden_header(name)
355+
}
352356
}
353357

354358
impl<T: WasiHttpView> WasiHttpView for WasiHttpImpl<T> {
@@ -357,6 +361,10 @@ impl<T: WasiHttpView> WasiHttpView for WasiHttpImpl<T> {
357361
fn http(&self) -> &WasiHttpCtx<Self::Client> {
358362
self.0.http()
359363
}
364+
365+
fn is_forbidden_header(&mut self, name: &http::header::HeaderName) -> bool {
366+
self.0.is_forbidden_header(name)
367+
}
360368
}
361369

362370
impl<T: ResourceView> ResourceView for WasiHttpImpl<T> {
@@ -374,7 +382,8 @@ pub trait WasiHttpView: ResourceView + Send {
374382
fn http(&self) -> &WasiHttpCtx<Self::Client>;
375383

376384
/// Whether a given header should be considered forbidden and not allowed.
377-
fn is_forbidden_header(&mut self, _name: &http::header::HeaderName) -> bool {
385+
fn is_forbidden_header(&mut self, name: &http::header::HeaderName) -> bool {
386+
_ = name;
378387
false
379388
}
380389
}

0 commit comments

Comments
 (0)