# must fail: fetch_OPf_dispatched fetch_OPe_dispatched fetch_OPw_dispatched fetch_OPf_listed_not_layer fetch_OPw_listed_not_layer union_OPw # a payload carrying refines is taken for a layer (head::Head::is_layer) diff --git a/wai/wai-rs/src/http_binding/head.rs b/wai/wai-rs/src/http_binding/head.rs index 97ff1fac..d5f6339e 100644 --- a/wai/wai-rs/src/http_binding/head.rs +++ b/wai/wai-rs/src/http_binding/head.rs @@ -164,6 +164,6 @@ impl Head { /// ordinary object: SPEC ยง4 dispatches it, and `refines` is not read there. pub fn is_layer(&self) -> bool { self.version == Version::Wai1 - && self.manifest_v1().is_ok_and(|m| crate::codecs::is_refinement_only(&m.model_requirement.capability)) + && self.manifest_v1().is_ok_and(|m| m.refines.is_some() || crate::codecs::is_refinement_only(&m.model_requirement.capability)) } }