Browse Source

- added testcase for bug #1322

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1968 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Marcus Rückert 15 years ago
parent
commit
ea872bea37
  1. 11
      tests/cachable.t
  2. 5
      tests/lighttpd.conf

11
tests/cachable.t

@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
use Test::More tests => 12;
use Test::More tests => 13;
use LightyTest;
my $tf = LightyTest->new();
@ -108,5 +108,14 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 412 } ];
ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + Last-Modified + overlong timestamp');
$t->{REQUEST} = ( <<EOF
GET / HTTP/1.0
If-None-Match: $etag
Host: etag.example.org
EOF
);
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + disabled etags on server side');
ok($tf->stop_proc == 0, "Stopping lighttpd");

5
tests/lighttpd.conf

@ -1,4 +1,6 @@
debug.log-request-handling = "enable"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
debug.log-condition-handling = "enable"
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
@ -214,3 +216,6 @@ $HTTP["cookie"] =~ "empty-ref" {
}
$HTTP["host"] == "etag.example.org" {
static-file.etags = "disable"
}

Loading…
Cancel
Save