| | 186 | # Try a 0 length chunked request, as it used to crash server |
| | 187 | { |
| | 188 | my $hdr = "POST /status HTTP/1.0\r\nTransfer-Encoding: chunked\r\n\r\n0\r\n\r\n"; |
| | 189 | my $sock = IO::Socket::INET->new( PeerAddr => "127.0.0.1:$port" ) |
| | 190 | or return undef; |
| | 191 | my $rv = syswrite($sock, $hdr); |
| | 192 | die unless $rv == length($hdr); |
| | 193 | |
| | 194 | # Give it time to crash |
| | 195 | select undef, undef, undef, 1.0; |
| | 196 | |
| | 197 | my $sock2 = IO::Socket::INET->new( PeerAddr => "127.0.0.1:$port" ); |
| | 198 | ok ($sock2, 'Server still alive'); |
| | 199 | } |
| | 200 | |