3 # add current source dir to the include-path
4 # we need this for make distcheck
5 (my $srcdir = $0) =~ s
,/[^/]+$,/,;
11 use Test
::More tests
=> 52;
14 my $tf = LightyTest
->new();
17 ok
($tf->start_proc == 0, "Starting lighttpd") or die();
19 ## Basic Request-Handling
21 $t->{REQUEST
} = ( <<EOF
25 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
26 ok
($tf->handle_http($t) == 0, 'file not found');
28 $t->{REQUEST
} = ( <<EOF
29 GET /foobar?foobar HTTP/1.0
32 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
33 ok
($tf->handle_http($t) == 0, 'file not found + querystring');
35 $t->{REQUEST
} = ( <<EOF
36 GET /12345.txt HTTP/1.0
40 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain' } ];
41 ok
($tf->handle_http($t) == 0, 'GET, content == 12345, mimetype text/plain');
43 $t->{REQUEST
} = ( <<EOF
44 GET /12345.html HTTP/1.0
48 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/html' } ];
49 ok
($tf->handle_http($t) == 0, 'GET, content == 12345, mimetype text/html');
51 $t->{REQUEST
} = ( <<EOF
52 GET /dummyfile.bla HTTP/1.0
56 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'application/octet-stream' } ];
57 ok
($tf->handle_http($t) == 0, 'GET, content == 12345, mimetype application/octet-stream');
60 $t->{REQUEST
} = ( <<EOF
62 Content-type: application/x-www-form-urlencoded
66 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
67 ok
($tf->handle_http($t) == 0, 'POST request, empty request-body');
69 $t->{REQUEST
} = ( <<EOF
73 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP-Content' => ''} ];
74 ok
($tf->handle_http($t) == 0, 'HEAD request, no content');
76 $t->{REQUEST
} = ( <<EOF
77 HEAD /12345.html HTTP/1.0
81 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP-Content' => '', 'Content-Type' => 'text/html', 'Content-Length' => '6'} ];
82 ok
($tf->handle_http($t) == 0, 'HEAD request, mimetype text/html, content-length');
84 $t->{REQUEST
} = ( <<EOF
85 HEAD http://123.example.org/12345.html HTTP/1.1
89 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, '-HTTP-Content' => '', 'Content-Type' => 'text/html', 'Content-Length' => '6'} ];
90 ok
($tf->handle_http($t) == 0, 'Hostname in first line, HTTP/1.1');
92 $t->{REQUEST
} = ( <<EOF
93 HEAD https://123.example.org/12345.html HTTP/1.0
96 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP-Content' => '', 'Content-Type' => 'text/html', 'Content-Length' => '6'} ];
97 ok
($tf->handle_http($t) == 0, 'Hostname in first line as https url');
99 $t->{REQUEST
} = ( <<EOF
100 HEAD /foobar?foobar HTTP/1.0
103 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, '-HTTP-Content' => '' } ];
104 ok
($tf->handle_http($t) == 0, 'HEAD request, file-not-found, query-string');
106 # (expect 200 OK instead of 100 Continue since request body sent with request)
107 # (if we waited to send request body, would expect 100 Continue, first)
108 $t->{REQUEST
} = ( <<EOF
109 POST /get-post-len.pl HTTP/1.1
110 Host: www.example.org
112 Content-Type: application/x-www-form-urlencoded
119 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
120 ok
($tf->handle_http($t) == 0, 'Continue, Expect');
122 # note Transfer-Encoding: chunked tests will fail with 411 Length Required if
123 # server.stream-request-body != 0 in lighttpd.conf
124 $t->{REQUEST
} = ( <<EOF
125 POST /get-post-len.pl HTTP/1.1
126 Host: www.example.org
128 Content-Type: application/x-www-form-urlencoded
129 Transfer-Encoding: chunked
137 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
138 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, lc hex');
140 $t->{REQUEST
} = ( <<EOF
141 POST /get-post-len.pl HTTP/1.1
142 Host: www.example.org
144 Content-Type: application/x-www-form-urlencoded
145 Transfer-Encoding: chunked
153 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
154 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, uc hex');
156 $t->{REQUEST
} = ( <<EOF
157 POST /get-post-len.pl HTTP/1.1
158 Host: www.example.org
160 Content-Type: application/x-www-form-urlencoded
161 Transfer-Encoding: chunked
169 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
170 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, two hex');
172 $t->{REQUEST
} = ( <<EOF
173 POST /get-post-len.pl HTTP/1.1
174 Host: www.example.org
176 Content-Type: application/x-www-form-urlencoded
177 Transfer-Encoding: chunked
182 Test-Trailer: testing
186 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
187 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, with trailer');
189 $t->{REQUEST
} = ( <<EOF
190 POST /get-post-len.pl HTTP/1.1
191 Host: www.example.org
193 Content-Type: application/x-www-form-urlencoded
194 Transfer-Encoding: chunked
202 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
203 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, chunked header comment');
205 $t->{REQUEST
} = ( <<EOF
206 POST /get-post-len.pl HTTP/1.1
207 Host: www.example.org
209 Content-Type: application/x-www-form-urlencoded
210 Transfer-Encoding: chunked
218 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ];
219 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked; bad chunked header');
221 $t->{REQUEST
} = ( <<EOF
222 POST /get-post-len.pl HTTP/1.1
223 Host: www.example.org
225 Content-Type: application/x-www-form-urlencoded
226 Transfer-Encoding: chunked
234 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ];
235 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked; mismatch chunked header size and chunked data size');
237 $t->{REQUEST
} = ( <<EOF
238 POST /get-post-len.pl HTTP/1.1
239 Host: www.example.org
241 Content-Type: application/x-www-form-urlencoded
242 Transfer-Encoding: chunked
244 a ; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
250 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ];
251 ok
($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked; chunked header too long');
255 $t->{REQUEST
} = ( <<EOF
256 GET /12345.txt HTTP/1.0
257 Host: 123.example.org
261 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '1234' } ];
262 ok
($tf->handle_http($t) == 0, 'GET, Range 0-3');
264 $t->{REQUEST
} = ( <<EOF
265 GET /12345.txt HTTP/1.0
266 Host: 123.example.org
270 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '45'."\n" } ];
271 ok
($tf->handle_http($t) == 0, 'GET, Range -3');
273 $t->{REQUEST
} = ( <<EOF
274 GET /12345.txt HTTP/1.0
275 Host: 123.example.org
279 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '45'."\n" } ];
280 ok
($tf->handle_http($t) == 0, 'GET, Range 3-');
282 $t->{REQUEST
} = ( <<EOF
283 GET /12345.txt HTTP/1.0
284 Host: 123.example.org
288 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => <<EOF
291 Content-Range: bytes 0-1/6\r
292 Content-Type: text/plain\r
296 Content-Range: bytes 3-4/6\r
297 Content-Type: text/plain\r
303 ok
($tf->handle_http($t) == 0, 'GET, Range 0-1,3-4');
305 $t->{REQUEST
} = ( <<EOF
306 GET /12345.txt HTTP/1.0
307 Host: 123.example.org
311 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
312 ok
($tf->handle_http($t) == 0, 'GET, Range 0--');
314 $t->{REQUEST
} = ( <<EOF
315 GET /12345.txt HTTP/1.0
316 Host: 123.example.org
320 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
321 ok
($tf->handle_http($t) == 0, 'GET, Range -2-3');
323 $t->{REQUEST
} = ( <<EOF
324 GET /12345.txt HTTP/1.0
325 Host: 123.example.org
329 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 416, 'HTTP-Content' => <<EOF
330 <?xml version="1.0" encoding="iso-8859-1"?>
331 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
332 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
333 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
335 <title>416 Requested Range Not Satisfiable</title>
338 <h1>416 Requested Range Not Satisfiable</h1>
343 ok
($tf->handle_http($t) == 0, 'GET, Range -0');
345 $t->{REQUEST
} = ( <<EOF
346 GET /12345.txt HTTP/1.0
347 Host: 123.example.org
351 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 416, 'HTTP-Content' => <<EOF
352 <?xml version="1.0" encoding="iso-8859-1"?>
353 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
354 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
355 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
357 <title>416 Requested Range Not Satisfiable</title>
360 <h1>416 Requested Range Not Satisfiable</h1>
366 ok
($tf->handle_http($t) == 0, 'GET, Range start out of range');
369 $t->{REQUEST
} = ( <<EOF
377 jfusfdngmd: gfjgfdusdfg
382 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
383 ok
($tf->handle_http($t) == 0, 'larger headers');
386 $t->{REQUEST
} = ( <<EOF
387 GET /range.pdf HTTP/1.0
391 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
392 ok
($tf->handle_http($t) == 0, 'GET, Range with range-requests-disabled');
394 $t->{REQUEST
} = ( <<EOF
395 GET /12345.txt HTTP/1.0
396 Host: 123.example.org
401 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "12345\n" } ];
402 ok
($tf->handle_http($t) == 0, 'GET, Range invalid range-unit (first)');
404 $t->{REQUEST
} = ( <<EOF
405 GET /12345.txt HTTP/1.0
406 Host: 123.example.org
411 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206 } ];
412 ok
($tf->handle_http($t) == 0, 'GET, Range ignore invalid range (second)');
414 $t->{REQUEST
} = ( <<EOF
421 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
422 ok
($tf->handle_http($t) == 0, 'OPTIONS with Content-Length');
424 $t->{REQUEST
} = ( <<EOF
425 OPTIONS rtsp://221.192.134.146:80 RTSP/1.1
426 Host: 221.192.134.146:80
429 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
430 ok
($tf->handle_http($t) == 0, 'OPTIONS for RTSP');
432 $t->{REQUEST
} = ( <<EOF
433 GET /index.html HTTP/1.0
434 If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT
435 If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT
438 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
439 ok
($tf->handle_http($t) == 0, 'Duplicate If-Mod-Since, with equal timestamps');
441 $t->{REQUEST
} = ( "GET / HTTP/1.0\r\nIf-Modified-Since: \r\n\r\n" );
442 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
443 ok
($tf->handle_http($t) == 0, 'empty If-Modified-Since');
445 $t->{REQUEST
} = ( "GET / HTTP/1.0\r\nIf-Modified-Since: foobar\r\n\r\n" );
446 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
447 ok
($tf->handle_http($t) == 0, 'broken If-Modified-Since');
449 $t->{REQUEST
} = ( "GET / HTTP/1.0\r\nIf-Modified-Since: this string is too long to be a valid timestamp\r\n\r\n" );
450 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
451 ok
($tf->handle_http($t) == 0, 'broken If-Modified-Since');
454 $t->{REQUEST
} = ( <<EOF
455 GET /index.html HTTP/1.0
456 If-Modified-Since2: Sun, 01 Jan 2036 00:00:03 GMT
457 If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT
460 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
461 ok
($tf->handle_http($t) == 0, 'Similar Headers (bug #1287)');
463 $t->{REQUEST
} = ( <<EOF
464 GET /index.html HTTP/1.0
465 If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT
468 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, 'Content-Type' => 'text/html' } ];
469 ok
($tf->handle_http($t) == 0, 'If-Modified-Since');
471 $t->{REQUEST
} = ( <<EOF
472 GET /index.html HTTP/1.0
473 If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT
476 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, '-Content-Length' => '' } ];
477 ok
($tf->handle_http($t) == 0, 'Status 304 has no Content-Length (#1002)');
479 $t->{REQUEST
} = ( <<EOF
480 GET /12345.txt HTTP/1.0
481 Host: 123.example.org
484 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain' } ];
485 $t->{SLOWREQUEST
} = 1;
486 ok
($tf->handle_http($t) == 0, 'GET, slow \\r\\n\\r\\n (#2105)');
487 undef $t->{SLOWREQUEST
};
489 print "\nPathinfo for static files\n";
490 $t->{REQUEST
} = ( <<EOF
491 GET /image.jpg/index.php HTTP/1.0
494 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'image/jpeg' } ];
495 ok
($tf->handle_http($t) == 0, 'static file accepting pathinfo by default');
497 $t->{REQUEST
} = ( <<EOF
498 GET /image.jpg/index.php HTTP/1.0
499 Host: zzz.example.org
502 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
503 ok
($tf->handle_http($t) == 0, 'static file with forbidden pathinfo');
506 print "\nConnection header\n";
507 $t->{REQUEST
} = ( <<EOF
508 GET /12345.txt HTTP/1.1
510 Host: 123.example.org
513 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ];
514 ok
($tf->handle_http($t) == 0, 'Connection-header, spaces before ":"');
516 $t->{REQUEST
} = ( <<EOF
517 GET /12345.txt HTTP/1.1
519 Host: 123.example.org
522 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ];
523 ok
($tf->handle_http($t) == 0, 'Connection-header, leading comma');
525 $t->{REQUEST
} = ( <<EOF
526 GET /12345.txt HTTP/1.1
527 Connection: close,,TE
528 Host: 123.example.org
531 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ];
532 ok
($tf->handle_http($t) == 0, 'Connection-header, no value between two commas');
534 $t->{REQUEST
} = ( <<EOF
535 GET /12345.txt HTTP/1.1
536 Connection: close, ,TE
537 Host: 123.example.org
540 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ];
541 ok
($tf->handle_http($t) == 0, 'Connection-header, space between two commas');
543 $t->{REQUEST
} = ( <<EOF
544 GET /12345.txt HTTP/1.1
546 Host: 123.example.org
549 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ];
550 ok
($tf->handle_http($t) == 0, 'Connection-header, comma after value');
552 $t->{REQUEST
} = ( <<EOF
553 GET /12345.txt HTTP/1.1
555 Host: 123.example.org
558 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ];
559 ok
($tf->handle_http($t) == 0, 'Connection-header, comma and space after value');
561 ok
($tf->stop_proc == 0, "Stopping lighttpd");