jorton 2004/02/28 13:49:55
Modified: perl-framework/t/conf extra.conf.in
Added: perl-framework/t/htdocs/modules/headers/ssl .htaccess
index.html
perl-framework/t/ssl headers.t
Log:
Add tests for mod_header's %s tag.
Revision Changes Path
1.46 +4 -0 httpd-test/perl-framework/t/conf/extra.conf.in
Index: extra.conf.in
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/t/conf/extra.conf.in,v
retrieving revision 1.45
retrieving revision 1.46
diff -w -d -u -r1.45 -r1.46
--- extra.conf.in 17 Feb 2004 17:34:22 -0000 1.45
+++ extra.conf.in 28 Feb 2004 21:49:54 -0000 1.46
@@ -242,6 +242,10 @@
AllowOverride All
</Directory>
+ <Directory @SERVERROOT@/htdocs/modules/headers/ssl>
+ AllowOverride All
+ </Directory>
+
<VirtualHost mod_headers>
<Location /manual>
Header add mod_headers_foo bar
1.1
httpd-test/perl-framework/t/htdocs/modules/headers/ssl/.htaccess
Index: .htaccess
===================================================================
Header set X-SSL-Flag %{HTTPS}s
Header set X-SSL-Cert %{SSL_SERVER_CERT}s
Header set X-SSL-None %{SSL_FOO_BAR}s
1.1
httpd-test/perl-framework/t/htdocs/modules/headers/ssl/index.html
Index: index.html
===================================================================
hello world
1.1 httpd-test/perl-framework/t/ssl/headers.t
Index: headers.t
===================================================================
use strict;
use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestRequest;
use Apache::TestUtil;
my $tests = 3;
plan tests => $tests, have_module('headers', 'ssl');
Apache::TestRequest::scheme('https');
my $h = HEAD_STR "/modules/headers/ssl/";
# look for 500 when mod_headers doesn't grok the %s tag
if ($h =~ /^HTTP\/1.1 500 Internal Server Error\n/) {
foreach (1..$tests) {
skip "Skipping because mod_headers doesn't grok %s\n";
}
exit 0;
}
$h =~ s/Client-Bad-Header-Line:.*$//g;
ok t_cmp(qr/X-SSL-Flag: on/, $h, "SSLFlag header set");
ok t_cmp(qr/X-SSL-Cert:.*END CERTIFICATE-----/, $h, "SSL certificate is
unwrapped");
ok t_cmp(qr/X-SSL-None: \(null\)\n/, $h, "unknown SSL variable not given");