~ubuntu-branches/ubuntu/hardy/lighttpd/hardy

« back to all changes in this revision

Viewing changes to tests/core-request.t

  • Committer: Bazaar Package Importer
  • Author(s): Michele Angrisano
  • Date: 2007-07-28 20:33:22 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070728203322-ut5ym6udh0xjxkma
Tags: 1.4.16-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add fam/gamin stat cache engine support.
  - Replace Depends: on perl with Depends: on libterm-readline-perl-perl.
  - Make sure that upgrades succeed, even if we can't restart lighttpd.
  - Clean environment in init.d script.
  - Update maintainer field in debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
use strict;
10
10
use IO::Socket;
11
 
use Test::More tests => 33;
 
11
use Test::More tests => 36;
12
12
use LightyTest;
13
13
 
14
14
my $tf = LightyTest->new();
273
273
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
274
274
ok($tf->handle_http($t) == 0, 'uppercase filenames');
275
275
 
 
276
$t->{REQUEST}  = ( <<EOF
 
277
GET / HTTP/1.0
 
278
Location: foo
 
279
Location: foobar
 
280
  baz
 
281
EOF
 
282
 );
 
283
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
 
284
ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping');
 
285
 
 
286
$t->{REQUEST}  = ( <<EOF
 
287
GET / HTTP/1.0
 
288
Location: 
 
289
Location: foobar
 
290
  baz
 
291
EOF
 
292
 );
 
293
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
 
294
ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping - test 2');
 
295
 
 
296
$t->{REQUEST}  = ( <<EOF
 
297
GET / HTTP/1.0
 
298
A: 
 
299
Location: foobar
 
300
  baz
 
301
EOF
 
302
 );
 
303
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
 
304
ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping - test 3');
 
305
 
 
306
 
 
307
 
276
308
 
277
309
ok($tf->stop_proc == 0, "Stopping lighttpd");
278
310