Changeset 1948
- Timestamp:
- 08/18/2007 11:35:27 AM (12 months ago)
- Location:
- branches/lighttpd-1.4.x
- Files:
-
- 4 modified
-
NEWS (modified) (1 diff)
-
src/mod_cgi.c (modified) (1 diff)
-
tests/docroot/www/nph-status.pl (modified) (1 diff)
-
tests/mod-cgi.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.4.x/NEWS
r1947 r1948 21 21 * fixed extra Content-Length header on 1xx, 204 and 304 (#1002) 22 22 * fixed handling of duplicate If-Modified-Since to return 304 23 * fixed extracting status code from NPH scripts (#1125) 23 24 * removed config-check if passwd files exist (#1188) 24 25 -
branches/lighttpd-1.4.x/src/mod_cgi.c
r1937 r1948 256 256 status = strtol(s+9, NULL, 10); 257 257 258 if ( con->http_status >= 100 &&259 con->http_status < 1000) {258 if (status >= 100 && 259 status < 1000) { 260 260 /* we expected 3 digits and didn't got them */ 261 261 con->parsed_response |= HTTP_STATUS; -
branches/lighttpd-1.4.x/tests/docroot/www/nph-status.pl
r1374 r1948 1 1 #!/usr/bin/perl 2 2 3 print "HTTP/1.0 30 FooBar\r\n"; 3 my $status = 200; 4 5 if (defined $ENV{"QUERY_STRING"}) { 6 $status = $ENV{"QUERY_STRING"}; 7 } 8 9 print "HTTP/1.0 ".$status." FooBar\r\n"; 4 10 print "\r\n"; -
branches/lighttpd-1.4.x/tests/mod-cgi.t
r1925 r1948 9 9 use strict; 10 10 use IO::Socket; 11 use Test::More tests => 1 6;11 use Test::More tests => 18; 12 12 use LightyTest; 13 13 … … 41 41 42 42 $t->{REQUEST} = ( <<EOF 43 GET /nph-status.pl HTTP/1.043 GET /nph-status.pl?30 HTTP/1.0 44 44 EOF 45 45 ); 46 46 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; 47 ok($tf->handle_http($t) == 0, 'NPH + perl, Bug #14'); 47 ok($tf->handle_http($t) == 0, 'NPH + perl, invalid status-code (#14)'); 48 49 $t->{REQUEST} = ( <<EOF 50 GET /nph-status.pl?304 HTTP/1.0 51 EOF 52 ); 53 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; 54 ok($tf->handle_http($t) == 0, 'NPH + perl, setting status-code (#1125)'); 55 56 $t->{REQUEST} = ( <<EOF 57 GET /nph-status.pl?200 HTTP/1.0 58 EOF 59 ); 60 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; 61 ok($tf->handle_http($t) == 0, 'NPH + perl, setting status-code'); 48 62 49 63 $t->{REQUEST} = ( <<EOF

