Skip to content

Commit a49bad2

Browse files
authored
Merge pull request #204 from bduggan/fix-http2-window-update
Fix http2 window update
2 parents 13a7c9f + ecf7321 commit a49bad2

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Revision history for Cro::HTTP
22

33
{{$NEXT}}
4+
- Avoid sending a 0-byte WINDOW_UPDATE frame.
45
- Permit use of updated HTTP::Pack module, Samuel Gillespie++
56

67
0.8.10

lib/Cro/HTTP2/FrameParser.rakumod

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ class Cro::HTTP2::FrameParser does Cro::Transform does Cro::ConnectionState[Cro:
6767
if $result.end-stream {
6868
start {
6969
my $bytes = $result.data.bytes;
70-
$connection-state.window-size.emit:
71-
Cro::HTTP2::Frame::WindowUpdate.new:
72-
stream-identifier => 0,
73-
flags => 0, increment => $bytes;
70+
if $bytes > 0 {
71+
$connection-state.window-size.emit:
72+
Cro::HTTP2::Frame::WindowUpdate.new:
73+
stream-identifier => 0,
74+
flags => 0, increment => $bytes;
75+
}
7476
}
7577
}
7678
else {

0 commit comments

Comments
 (0)