comparison fastcgi_body2.t @ 1791:42d9fd20eeb6

Tests: avoid uninitialized warnings in fastcgi tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 19 Sep 2022 14:13:22 +0400
parents 1a820a5a32ae
children
comparison
equal deleted inserted replaced
1790:ba625d5a02e4 1791:42d9fd20eeb6
112 my $socket = FCGI::OpenSocket("127.0.0.1:$port", 5); 112 my $socket = FCGI::OpenSocket("127.0.0.1:$port", 5);
113 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, 113 my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV,
114 $socket); 114 $socket);
115 115
116 while( $request->Accept() >= 0 ) { 116 while( $request->Accept() >= 0 ) {
117 read(STDIN, my $body, $ENV{'CONTENT_LENGTH'}); 117 read(STDIN, my $body, $ENV{'CONTENT_LENGTH'} || 0);
118 my $len = length $body; 118 my $len = length $body;
119 119
120 sleep 3 if $port == port(8081); 120 sleep 3 if $port == port(8081);
121 121
122 print <<EOF; 122 print <<EOF;