LibWeb: Ensure FilteredResponse setters forward to the base class

The spec for filtered responses states:

    Unless stated otherwise a filtered response’s associated concepts
    (such as its body) refer to the associated concepts of its internal
    response.

This includes setting its associated concepts. In particular, when the
filtered response's body is set upon fetching a request with integrity
metadata, we must set the internal response's body instead.

Further restrictions that apply to filtered response subclasses (such as
opaque filtered responses having a status code of 0) are already
implemented.
This commit is contained in:
Timothy Flynn 2024-12-08 22:18:33 -05:00 committed by Andrew Kaster
commit 9396a643b8
Notes: github-actions[bot] 2024-12-10 03:03:55 +00:00
2 changed files with 40 additions and 24 deletions

View file

@ -422,7 +422,6 @@ void OpaqueFilteredResponse::visit_edges(JS::Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_header_list);
visitor.visit(m_body);
}
GC::Ref<OpaqueRedirectFilteredResponse> OpaqueRedirectFilteredResponse::create(JS::VM& vm, GC::Ref<Response> internal_response)
@ -442,7 +441,6 @@ void OpaqueRedirectFilteredResponse::visit_edges(JS::Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_header_list);
visitor.visit(m_body);
}
}