comparison spdy.t @ 426:7cb6af00afdd

Tests: fixed SPDY tests with large header length. Previously it was truncated modulo 2^16.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 04 Jul 2014 12:37:13 +0400
parents cc7da696a330
children daea9cf92c14
comparison
equal deleted inserted replaced
425:cc7da696a330 426:7cb6af00afdd
705 $status == Compress::Raw::Zlib->Z_OK or fail "deflate failed"; 705 $status == Compress::Raw::Zlib->Z_OK or fail "deflate failed";
706 $status = $d->flush(\my $tail => Compress::Raw::Zlib->Z_SYNC_FLUSH); 706 $status = $d->flush(\my $tail => Compress::Raw::Zlib->Z_SYNC_FLUSH);
707 $status == Compress::Raw::Zlib->Z_OK or fail "flush failed"; 707 $status == Compress::Raw::Zlib->Z_OK or fail "flush failed";
708 $output = $start . $tail; 708 $output = $start . $tail;
709 709
710 my $len = ''; 710 # set length, attach headers and optional body
711 vec($len, 7, 8) = (length $output) + 10; 711
712 $buf |= $len; 712 $buf |= pack "x4N", length($output) + 10;
713 $buf .= $output; 713 $buf .= $output;
714 714
715 if (defined $body) { 715 if (defined $body) {
716 $buf .= pack "NCxn", $ctx->{last_stream}, 0x01, length $body; 716 $buf .= pack "NCxn", $ctx->{last_stream}, 0x01, length $body;
717 $buf .= $body; 717 $buf .= $body;