wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Handling of multiple responses

Open wpt-issue-mover opened this issue 8 years ago • 9 comments

Originally posted as https://github.com/w3c/wptserve/issues/117 by @annevk on 05 Apr 2017, 08:11 UTC:

If we want to test 1xx responses, we need to be able to respond with one, and then follow up with another or a final non-1xx response.

wpt-issue-mover avatar Nov 20 '17 16:11 wpt-issue-mover

@annevk, can you elaborate on what's needed here? Which tests can't be written because this is missing?

foolip avatar Nov 21 '17 15:11 foolip

Basically ensuring that everything that does a fetch does not do bad things if the scenario in OP happens. But also testing https://tools.ietf.org/html/draft-ietf-httpbis-early-hints I suppose if browsers implement that (Chrome might).

annevk avatar Nov 21 '17 15:11 annevk

Would that require some changes to wptserve? I think there's already a way to send a raw response and to save state across requests.

foolip avatar Nov 21 '17 16:11 foolip

@foolip I'm not sure why you'd need to save state here? I think I tried raw responses, but it's been ages.

annevk avatar Nov 21 '17 17:11 annevk

If raw responses are all that's needed, then probably this already works then. Can you change the labels to the specs that need this, and send back to infra if it doesn't work?

foolip avatar Nov 21 '17 17:11 foolip

I'm investigating fetchpriority in Link headers for early hints in Mozilla's bug 1882084 and also could not find in the wpt doc how to send multiple headers (more specifically 1xx informational response, followed by 2xx successful response).

@foolip: What do you mean by raw responses? Using .asis files?

fred-wang avatar Apr 26 '24 15:04 fred-wang

I just found https://github.com/web-platform-tests/wpt/commits/master/loading/early-hints which has tests for early hints.

fred-wang avatar Apr 30 '24 13:04 fred-wang

@fred-wang .asis files is indeed what I meant. That's not used in loading/early-hints/ however, so I guess there's another way?

foolip avatar May 21 '24 13:05 foolip

@foolip Right, it seems they are just using response.writer.write_raw_header_frame to write a raw 103 response in early-hints-test-loader.h2.py so I can do the same with fetchpriority (I had started https://phabricator.services.mozilla.com/D209632 but have been focusing on something else so haven't really tried yet).

fred-wang avatar May 21 '24 13:05 fred-wang