Mercurial > hg > nginx-tests
diff fastcgi_request_buffering_chunked.t @ 1167:1e79a9613813
Tests: handled SIGPIPE in fastcgi tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 20 Apr 2017 16:05:10 +0300 |
parents | 882267679006 |
children |
line wrap: on
line diff
--- a/fastcgi_request_buffering_chunked.t Thu Apr 20 16:03:50 2017 +0300 +++ b/fastcgi_request_buffering_chunked.t Thu Apr 20 16:05:10 2017 +0300 @@ -346,7 +346,12 @@ $f->{http_end} = sub { my $buf = ''; - fastcgi_respond($client, $version, $id, <<EOF); + eval { + local $SIG{ALRM} = sub { die "timeout\n" }; + local $SIG{PIPE} = sub { die "sigpipe\n" }; + alarm(5); + + fastcgi_respond($client, $version, $id, <<EOF); Status: 200 OK Connection: close X-Port: $port @@ -354,12 +359,7 @@ OK EOF - $client->close; - - eval { - local $SIG{ALRM} = sub { die "timeout\n" }; - local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + $client->close; $s->sysread($buf, 1024); log_in($buf);