Changeset 62
- Timestamp:
- 03/01/2005 01:37:40 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 removed
- 3 modified
- 1 moved
-
src/mod_fastcgi.c (modified) (2 diffs)
-
tests/Makefile.am (modified) (2 diffs)
-
tests/fastcgi-12.conf (deleted)
-
tests/fastcgi-auth.conf (moved) (moved from trunk/tests/fastcgi-11.conf)
-
tests/fastcgi-responder.conf (added)
-
tests/fcgi-responder.c (added)
-
tests/run-tests.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mod_fastcgi.c
r52 r62 2026 2026 c = hctx->response->ptr + 1; 2027 2027 } else if (NULL != (c = buffer_search_string_len(hctx->response, "\r\n\r\n", 4))) { 2028 hlen = c - hctx->response->ptr + 4; 2028 c += 4; 2029 hlen = c - hctx->response->ptr; 2030 2029 2031 } else if (NULL != (c = buffer_search_string_len(hctx->response, "\n\n", 2))) { 2030 hlen = c - hctx->response->ptr + 2; 2032 c += 2; 2033 hlen = c - hctx->response->ptr; 2031 2034 } 2032 2035 … … 2054 2057 2055 2058 if (blen) { 2056 http_chunk_append_mem(srv, con, c + 4, blen + 1);2059 http_chunk_append_mem(srv, con, c, blen + 1); 2057 2060 joblist_append(srv, con); 2058 2061 #if 0 -
trunk/tests/Makefile.am
r56 r62 3 3 4 4 if CHECK_WITH_FASTCGI 5 check_PROGRAMS=fcgi-auth 5 check_PROGRAMS=fcgi-auth fcgi-responder 6 6 7 7 fcgi_auth_SOURCES=fcgi-auth.c 8 8 fcgi_auth_LDADD=-lfcgi 9 10 fcgi_responder_SOURCES=fcgi-responder.c 11 fcgi_responder_LDADD=-lfcgi 9 12 endif 10 13 … … 15 18 16 19 CONFS=fastcgi-10.conf \ 17 fastcgi- 11.conf \18 fastcgi- 12.conf \20 fastcgi-auth.conf \ 21 fastcgi-responder.conf \ 19 22 fastcgi-13.conf \ 20 23 bug-06.conf \ -
trunk/tests/run-tests.pl
r60 r62 3 3 use strict; 4 4 use IO::Socket; 5 use Test::More tests => 12 0;5 use Test::More tests => 124; 6 6 7 7 … … 33 33 34 34 kill('TERM',$pid) or return -1; 35 select(undef, undef, undef, 0. 25);35 select(undef, undef, undef, 0.01); 36 36 37 37 return 0; … … 1138 1138 ok(stop_proc == 0, "Stopping lighttpd"); 1139 1139 1140 $configfile = 'fastcgi- 11.conf';1141 ok(start_proc == 0, "Starting lighttpd with fastcgi-11.conf") or die();1140 $configfile = 'fastcgi-auth.conf'; 1141 ok(start_proc == 0, "Starting lighttpd with $configfile") or die(); 1142 1142 @request = ( <<EOF 1143 1143 GET /index.html?ok HTTP/1.0 … … 1148 1148 ok(handle_http == 0, 'FastCGI - Auth'); 1149 1149 1150 ok(stop_proc == 0, "Stopping lighttpd");1151 1152 $configfile = 'fastcgi-12.conf';1153 ok(start_proc == 0, "Starting lighttpd with fastcgi-12.conf") or die();1154 1150 @request = ( <<EOF 1155 1151 GET /index.html?fail HTTP/1.0 … … 1199 1195 ok(stop_proc == 0, "Stopping lighttpd"); 1200 1196 1201 1197 $configfile = 'fastcgi-responder.conf'; 1198 ok(start_proc == 0, "Starting lighttpd with $configfile") or die(); 1199 @request = ( <<EOF 1200 GET /index.fcgi?lf HTTP/1.0 1201 Host: www.example.org 1202 EOF 1203 ); 1204 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ); 1205 ok(handle_http == 0, 'line-ending \n\n'); 1206 1207 @request = ( <<EOF 1208 GET /index.fcgi?crlf HTTP/1.0 1209 Host: www.example.org 1210 EOF 1211 ); 1212 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ); 1213 ok(handle_http == 0, 'line-ending \r\n\r\n'); 1214 1215 @request = ( <<EOF 1216 GET /index.fcgi?slow-lf HTTP/1.0 1217 Host: www.example.org 1218 EOF 1219 ); 1220 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ); 1221 ok(handle_http == 0, 'line-ending \n + \n'); 1222 1223 1224 1225 @request = ( <<EOF 1226 GET /index.fcgi?slow-crlf HTTP/1.0 1227 Host: www.example.org 1228 EOF 1229 ); 1230 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ); 1231 ok(handle_http == 0, 'line-ending \r\n + \r\n'); 1232 1233 1234 ok(stop_proc == 0, "Stopping lighttpd"); 1235

