Skip to content

Commit

Permalink
[QuicTransport] Address comments in pull/22844
Browse files Browse the repository at this point in the history
Address comments provided in
#22844.
  • Loading branch information
yutakahirano committed May 20, 2020
1 parent cf92605 commit d0d817c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/quic/quic_transport_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 inditation 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
Expand Down
3 changes: 3 additions & 0 deletions webtransport/quic/handlers/client-indication.quic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d0d817c

Please sign in to comment.