comparison h2.t @ 670:944b87756cab

Tests: fixed GOAWAY and PING frames parsing in HTTP/2 tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 02 Sep 2015 13:05:57 +0300
parents 0c442e551ba1
children 0c70eb166a3a
comparison
equal deleted inserted replaced
669:0c442e551ba1 670:944b87756cab
1738 return \%payload; 1738 return \%payload;
1739 } 1739 }
1740 1740
1741 sub ping { 1741 sub ping {
1742 my ($ctx, $buf, $len) = @_; 1742 my ($ctx, $buf, $len) = @_;
1743 return { value => unpack "a8", $buf }; 1743 return { value => unpack "A$len", $buf };
1744 } 1744 }
1745 1745
1746 sub rst_stream { 1746 sub rst_stream {
1747 my ($ctx, $buf, $len) = @_; 1747 my ($ctx, $buf, $len) = @_;
1748 return { code => unpack "N", $buf }; 1748 return { code => unpack "N", $buf };
1756 substr($stream, 0, 1) = 0; 1756 substr($stream, 0, 1) = 0;
1757 $stream = unpack("N", pack("B32", $stream)); 1757 $stream = unpack("N", pack("B32", $stream));
1758 $payload{last_sid} = $stream; 1758 $payload{last_sid} = $stream;
1759 1759
1760 $len -= 4; 1760 $len -= 4;
1761 $payload{debug} = unpack "x4 A$len", $buf; 1761 $payload{code} = unpack "x4 N", $buf;
1762 $payload{debug} = unpack "x8 A$len", $buf;
1762 return \%payload; 1763 return \%payload;
1763 } 1764 }
1764 1765
1765 sub window_update { 1766 sub window_update {
1766 my ($ctx, $buf, $len) = @_; 1767 my ($ctx, $buf, $len) = @_;