summaryrefslogtreecommitdiff
path: root/tests/core-request.t
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-08-27 16:35:57 +0000
committerJan Kneschke <jan@kneschke.de>2005-08-27 16:35:57 +0000
commit0212534554c46e49398edb938a52c472df3c813c (patch)
tree46c84dc4adc93ae47e4b8a6e7df6b9543f50d92d /tests/core-request.t
parentc013b0180d6698476abf7d7591304e35f51eeca9 (diff)
downloadlighttpd1.4-0212534554c46e49398edb938a52c472df3c813c.tar.gz
lighttpd1.4-0212534554c46e49398edb938a52c472df3c813c.zip
fixed detection of mimetype on uppercase extensions
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@632 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/core-request.t')
-rwxr-xr-xtests/core-request.t25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/core-request.t b/tests/core-request.t
index a4fa9db7..65ffcbec 100755
--- a/tests/core-request.t
+++ b/tests/core-request.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
-use Test::More tests => 28;
+use Test::More tests => 31;
use LightyTest;
my $tf = LightyTest->new();
@@ -237,5 +237,28 @@ EOF
$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } );
ok($tf->handle_http($t) == 0, 'Host missing');
+print "\nContent-Type\n";
+$t->{REQUEST} = ( <<EOF
+GET /image.jpg HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'image/jpeg' } );
+ok($tf->handle_http($t) == 0, 'Content-Type - image/jpeg');
+
+$t->{REQUEST} = ( <<EOF
+GET /image.JPG HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'image/jpeg' } );
+ok($tf->handle_http($t) == 0, 'Content-Type - image/jpeg');
+
+$t->{REQUEST} = ( <<EOF
+GET /a HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'application/octet-stream' } );
+ok($tf->handle_http($t) == 0, 'Content-Type - unknown');
+
+
ok($tf->stop_proc == 0, "Stopping lighttpd");