whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.18k stars 2.69k forks source link

Does "load an HTML document" miss respecting the navigation param's response's body? #10776

Closed mbrodesser-Igalia closed 4 days ago

mbrodesser-Igalia commented 1 week ago

What is the issue with the HTML Standard?

^1 invokes ^2. The latter ignores navigation param's response's body.

This is relevant because ^3 invokes ^1 and sets the response's body in step 11 and populates the navigation params in step 11 with it.

domenic commented 5 days ago

1 invokes 2. The latter ignores navigation param's response's body.

This is intentional. The body is consumed by step 3 of [1]. [2] is only about Document creation; there's no law saying that we must populate during the same algorithm as we create.

https://github.com/whatwg/html/issues/8095 discusses making step 3 more rigorous, but I don't think there's any issue here.

I'll close this, but am happy to reopen it if I've misunderstood what you're getting at.

mbrodesser-Igalia commented 5 days ago

1 invokes 2. The latter ignores navigation param's response's body.

This is intentional. The body is consumed by step 3 of [1].

Is it? navigationParam's response is only used to process link headers. The navigationParam's response's body would have to be accessed somewhere and that seems to not happen.

[2] is only about Document creation; there's no law saying that we must populate during the same algorithm as we create.

8095 discusses making step 3 more rigorous, but I don't think there's any issue here.

I'll close this, but am happy to reopen it if I've misunderstood what you're getting at.

domenic commented 4 days ago

It is accessed by this spec text (emphasis mine):

Each task that the networking task source places on the task queue while fetching runs must then fill the parser's input byte stream with the fetched bytes

As I said, #8095 discusses making this more rigorous, but I hope you can see how this accesses the response body, even though it doesn't use that exact variable name.

mbrodesser-Igalia commented 1 day ago

It is accessed by this spec text (emphasis mine):

Each task that the networking task source places on the task queue while fetching runs must then fill the parser's input byte stream with the fetched bytes

As I said, #8095 discusses making this more rigorous, but I hope you can see how this accesses the response body, even though it doesn't use that exact variable name.

TBH I don't see why this necessarily accesses the response body; one would presumably need more context to deduce that. It's fine to keep this ticket closed, given there's #8095.