Skip to content

Commit

Permalink
Eat padding more efficiently
Browse files Browse the repository at this point in the history
  • Loading branch information
awelzel committed Oct 5, 2023
1 parent 93f7f12 commit d8c6210
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions analyzer/QUIC.spicy
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ public type Frame = unit(header: LongHeaderPacket, from_client: bool, crypto_sin
crypto_sink.write(self.c.cryptodata, self.c.offset.result);
}
FrameType::CONNECTION_CLOSE1 -> : ConnectionClosePayload(header);
@if SPICY_VERSION >= 10800
FrameType::PADDING -> : skip /\x00*/; # eat the padding
@else
FrameType::PADDING -> : /\x00*/; # eat the padding
@endif
FrameType::PING -> : void;
* -> : void {
throw "unhandled frame type %s in %s" % (self.frame_type, header.first_byte.packet_type);
Expand Down

0 comments on commit d8c6210

Please sign in to comment.