From b1344a84199675819d0d414dc5ed40be045f45f1 Mon Sep 17 00:00:00 2001 From: Yutaka Hirano Date: Tue, 26 May 2020 11:24:43 +0000 Subject: [PATCH] Bug 1639458 [wpt PR 23705] - [QuicTransport] Address comments in pull/22844, a=testonly Automatic update from web-platform-tests [QuicTransport] Address comments in pull/22844 (#23705) * [QuicTransport] Address comments in pull/22844 Address comments provided in https://github.com/web-platform-tests/wpt/pull/22844. -- wpt-commits: 6e5e590ef6d34a2cdbc04bbc493d34e482db1d77 wpt-pr: 23705 --- .../web-platform/tests/tools/quic/quic_transport_server.py | 4 +++- .../webtransport/quic/handlers/client-indication.quic.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/web-platform/tests/tools/quic/quic_transport_server.py b/testing/web-platform/tests/tools/quic/quic_transport_server.py index 10d81743693b4..9a04ad17f195c 100644 --- a/testing/web-platform/tests/tools/quic/quic_transport_server.py +++ b/testing/web-platform/tests/tools/quic/quic_transport_server.py @@ -56,9 +56,11 @@ def quic_event_received(self, event: QuicEvent) -> None: isinstance(event, StreamDataReceived) and event.stream_id == 2): # client indication process + prefix = 'Client indication error: ' self.client_indication_data += event.data + if len(self.client_indication_data) > 65535: + raise Exception('too large data for client indication') if event.end_stream: - prefix = 'Client inditation error: ' self.process_client_indication() if self.is_closing_or_closed(): return diff --git a/testing/web-platform/tests/webtransport/quic/handlers/client-indication.quic.py b/testing/web-platform/tests/webtransport/quic/handlers/client-indication.quic.py index da0701cc04b17..56238c7514c06 100644 --- a/testing/web-platform/tests/webtransport/quic/handlers/client-indication.quic.py +++ b/testing/web-platform/tests/webtransport/quic/handlers/client-indication.quic.py @@ -12,6 +12,9 @@ async def notify_pass(connection: QuicConnectionProtocol): writer.write_eof() +# Verifies that the client indication sent by the client is correct. Creates +# a unidirectional stream containing "PASS" when the check finishes +# sucessfully. def handle_client_indication(connection: QuicConnectionProtocol, origin: str, query: Dict[str, str]): logging.log(logging.INFO, 'origin = %s, query = %s' % (origin, query))