Changeset 56
- Timestamp:
- 02/28/2005 05:08:05 PM (4 years ago)
- Location:
- trunk/tests
- Files:
-
- 4 added
- 30 removed
- 5 modified
-
Makefile.am (modified) (1 diff)
-
accessdeny-01.sh (deleted)
-
bug-03.sh (deleted)
-
bug-06.sh (deleted)
-
bug-12.sh (deleted)
-
bug-14.sh (deleted)
-
bug-15-2.sh (deleted)
-
bug-15-3.sh (deleted)
-
bug-15.sh (deleted)
-
bug-urldecode-00.sh (deleted)
-
compress-01.sh (deleted)
-
compress-02.sh (deleted)
-
compress-03.sh (deleted)
-
compress-04.sh (deleted)
-
docroot/www/Makefile.am (modified) (1 diff)
-
docroot/www/expire (added)
-
docroot/www/expire/Makefile.am (added)
-
docroot/www/expire/access.txt (added)
-
docroot/www/expire/modification.txt (added)
-
fastcgi-01.sh (deleted)
-
fastcgi-02.sh (deleted)
-
fastcgi-03.sh (deleted)
-
fastcgi-04.sh (deleted)
-
fastcgi-05.sh (deleted)
-
fastcgi-06.sh (deleted)
-
fastcgi-07.sh (deleted)
-
fastcgi-08.sh (deleted)
-
fastcgi-09.sh (deleted)
-
fastcgi-10.sh (deleted)
-
fastcgi-11.sh (deleted)
-
fastcgi-12.sh (deleted)
-
fastcgi-13.sh (deleted)
-
head-01.sh (deleted)
-
large-header-01.sh (deleted)
-
lighttpd.conf (modified) (5 diffs)
-
pathinfo-01.sh (deleted)
-
pathinfo-02.sh (deleted)
-
prepare.sh (modified) (2 diffs)
-
run-tests.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/Makefile.am
r44 r56 12 12 prepare.sh \ 13 13 run-tests.pl \ 14 bug-03.sh \15 bug-06.sh \16 bug-12.sh \17 large-header-01.sh \18 compress-01.sh \19 compress-02.sh \20 compress-03.sh \21 compress-04.sh \22 fastcgi-10.sh \23 fastcgi-11.sh \24 fastcgi-12.sh \25 fastcgi-13.sh \26 14 cleanup.sh 27 15 -
trunk/tests/docroot/www/Makefile.am
r18 r56 2 2 phpself.php redirect.php cgi-pathinfo.pl phphost.php \ 3 3 nph-status.pl 4 SUBDIRS=go indexfile 4 SUBDIRS=go indexfile expire -
trunk/tests/lighttpd.conf
r25 r56 4 4 ## bind to port (default: 80) 5 5 server.port = 2048 6 7 # server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"8 6 9 7 ## bind to localhost (default: all interfaces) … … 14 12 15 13 fastcgi.debug = 1 16 17 ##18 ## Format: <errorfile-prefix><status>.html19 ## -> ..../status-404.html for 'File not found'20 #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"21 14 22 15 server.dir-listing = "enable" … … 46 39 server.indexfiles = ( "index.php", "index.html", 47 40 "index.htm", "default.htm" ) 48 49 #,-- only root can use these options50 #|51 #|# chroot() to directory (default: no chroot() )52 #| server.chroot /53 #|# change uid to <uid> (default: don't care)54 #| server.userid wwwrun55 #|# change uid to <uid> (default: don't care)56 #| server.groupid wwwrun57 #|58 #`--59 41 60 42 … … 103 85 ".py" => "/usr/bin/python" ) 104 86 105 userdir.include-user = ( " weigon" )87 userdir.include-user = ( "jan" ) 106 88 userdir.path = "/" 107 89 … … 144 126 url.redirect = ( "^/redirect/$" => "http://localhost:2048/" ) 145 127 146 expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") 128 expire.url = ( "/expire/access" => "access 2 hours", 129 "/expire/modification" => "access plus 1 seconds 2 minutes") 147 130 148 131 #cache.cache-dir = "/home/weigon/wwwroot/cache/" -
trunk/tests/prepare.sh
r10 r56 12 12 mkdir -p $tmpdir/servers/www.example.org/pages/dummydir/ 13 13 mkdir -p $tmpdir/servers/www.example.org/pages/go/ 14 mkdir -p $tmpdir/servers/www.example.org/pages/expire/ 14 15 mkdir -p $tmpdir/servers/www.example.org/pages/indexfile/ 15 16 mkdir -p $tmpdir/servers/123.example.org/pages/ … … 24 25 $srcdir/docroot/www/*.txt $tmpdir/servers/www.example.org/pages/ 25 26 cp $srcdir/docroot/www/go/*.php $tmpdir/servers/www.example.org/pages/go/ 27 cp $srcdir/docroot/www/expire/*.txt $tmpdir/servers/www.example.org/pages/expire/ 26 28 cp $srcdir/docroot/www/indexfile/*.php $tmpdir/servers/www.example.org/pages/indexfile/ 27 29 cp $srcdir/docroot/123/*.txt \ -
trunk/tests/run-tests.pl
r51 r56 3 3 use strict; 4 4 use IO::Socket; 5 use Test::More tests => 89;5 use Test::More tests => 114; 6 6 7 7 … … 33 33 34 34 kill('TERM',$pid) or return -1; 35 select(undef, undef, undef, 0.25); 35 36 36 37 return 0; … … 166 167 167 168 if (!defined $resp_hdr{$k}) { 168 diag(sprintf("required header '%s' is missing\n", $ _));169 diag(sprintf("required header '%s' is missing\n", $k)); 169 170 return -1; 170 171 } … … 747 748 748 749 750 @request = ( <<EOF 751 GET / HTTP/1.0 752 Hsgfsdjf: asdfhdf 753 hdhd: shdfhfdasd 754 hfhr: jfghsdfg 755 jfuuehdmn: sfdgjfdg 756 jvcbzufdg: sgfdfg 757 hrnvcnd: jfjdfg 758 jfusfdngmd: gfjgfdusdfg 759 nfj: jgfdjdfg 760 jfue: jfdfdg 761 EOF 762 ); 763 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ); 764 ok(handle_http == 0, 'larger headers'); 765 749 766 750 767 … … 942 959 943 960 961 962 print "\nmodules - mod_compress\n"; 963 @request = ( <<EOF 964 GET /index.html HTTP/1.0 965 Accept-Encoding: deflate 966 EOF 967 ); 968 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '' } ); 969 ok(handle_http == 0, 'Vary is set'); 970 971 @request = ( <<EOF 972 GET /index.html HTTP/1.0 973 Accept-Encoding: deflate 974 EOF 975 ); 976 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Length' => '1288', '+Content-Encoding' => '' } ); 977 ok(handle_http == 0, 'deflate - Content-Length and Content-Encoding is set'); 978 979 @request = ( <<EOF 980 GET /index.html HTTP/1.0 981 Accept-Encoding: gzip 982 EOF 983 ); 984 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', '+Content-Encoding' => '' } ); 985 ok(handle_http == 0, 'gzip - Content-Length and Content-Encoding is set'); 986 987 @request = ( <<EOF 988 GET /index.txt HTTP/1.0 989 Accept-Encoding: gzip, deflate 990 EOF 991 ); 992 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', '+Content-Encoding' => '' } ); 993 ok(handle_http == 0, 'gzip, deflate - Content-Length and Content-Encoding is set'); 994 995 996 print "\nmodules - mod_expire\n"; 997 @request = ( <<EOF 998 GET /expire/access.txt HTTP/1.0 999 EOF 1000 ); 1001 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Expires' => '' } ); 1002 ok(handle_http == 0, 'access'); 1003 1004 @request = ( <<EOF 1005 GET /expire/modification.txt HTTP/1.0 1006 EOF 1007 ); 1008 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Expires' => '' } ); 1009 ok(handle_http == 0, 'modification'); 1010 1011 1012 1013 1014 1015 944 1016 print "\nmodules - mod_userdir\n"; 945 1017 … … 968 1040 ok(handle_http == 0, 'valid user + redirect'); 969 1041 970 971 972 973 974 975 1042 print "\nclean up\n"; 976 1043 977 1044 ok(stop_proc == 0, "Stopping lighttpd"); 978 1045 979 1046 print "\nspecial config\n"; 1047 1048 $configfile = 'fastcgi-10.conf'; 1049 ok(start_proc == 0, "Starting lighttpd with fastcgi-10.conf") or die(); 1050 @request = ( <<EOF 1051 GET /phphost.php HTTP/1.0 1052 Host: zzz.example.org 1053 EOF 1054 ); 1055 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'zzz.example.org' } ); 1056 ok(handle_http == 0, 'FastCGI + Host'); 1057 1058 ok(stop_proc == 0, "Stopping lighttpd"); 1059 1060 $configfile = 'fastcgi-11.conf'; 1061 ok(start_proc == 0, "Starting lighttpd with fastcgi-11.conf") or die(); 1062 @request = ( <<EOF 1063 GET /index.html?ok HTTP/1.0 1064 Host: www.example.org 1065 EOF 1066 ); 1067 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ); 1068 ok(handle_http == 0, 'FastCGI - Auth'); 1069 1070 ok(stop_proc == 0, "Stopping lighttpd"); 1071 1072 $configfile = 'fastcgi-12.conf'; 1073 ok(start_proc == 0, "Starting lighttpd with fastcgi-12.conf") or die(); 1074 @request = ( <<EOF 1075 GET /index.html?fail HTTP/1.0 1076 Host: www.example.org 1077 EOF 1078 ); 1079 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ); 1080 ok(handle_http == 0, 'FastCGI - Auth'); 1081 1082 ok(stop_proc == 0, "Stopping lighttpd"); 1083 1084 $configfile = 'fastcgi-13.conf'; 1085 ok(start_proc == 0, "Starting lighttpd with fastcgi-13.conf") or die(); 1086 @request = ( <<EOF 1087 GET /indexfile/index.php HTTP/1.0 1088 Host: www.example.org 1089 EOF 1090 ); 1091 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ); 1092 ok(handle_http == 0, 'FastCGI + local spawning'); 1093 1094 ok(stop_proc == 0, "Stopping lighttpd"); 1095 1096 $configfile = 'bug-06.conf'; 1097 ok(start_proc == 0, "Starting lighttpd with bug-06.conf") or die(); 1098 @request = ( <<EOF 1099 GET /indexfile/ HTTP/1.0 1100 Host: www.example.org 1101 EOF 1102 ); 1103 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/indexfile/index.php' } ); 1104 ok(handle_http == 0, 'Bug #6'); 1105 1106 ok(stop_proc == 0, "Stopping lighttpd"); 1107 1108 $configfile = 'bug-12.conf'; 1109 ok(start_proc == 0, "Starting lighttpd with bug-12.conf") or die(); 1110 @request = ( <<EOF 1111 POST /indexfile/abc HTTP/1.0 1112 Host: www.example.org 1113 Content-Length: 0 1114 EOF 1115 ); 1116 @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => '/indexfile/return-404.php' } ); 1117 ok(handle_http == 0, 'Bug #12'); 1118 1119 ok(stop_proc == 0, "Stopping lighttpd"); 1120 1121

