You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by jo...@apache.org on 2005/09/22 17:39:00 UTC

svn commit: r290966 - in /httpd/test/trunk/perl-framework/t: conf/ssl/ssl.conf.in ssl/pr12355.t

Author: jorton
Date: Thu Sep 22 08:38:56 2005
New Revision: 290966

URL: http://svn.apache.org/viewcvs?rev=290966&view=rev
Log:
Add test case for PR 12355.

Added:
    httpd/test/trunk/perl-framework/t/ssl/pr12355.t
Modified:
    httpd/test/trunk/perl-framework/t/conf/ssl/ssl.conf.in

Modified: httpd/test/trunk/perl-framework/t/conf/ssl/ssl.conf.in
URL: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/conf/ssl/ssl.conf.in?rev=290966&r1=290965&r2=290966&view=diff
==============================================================================
--- httpd/test/trunk/perl-framework/t/conf/ssl/ssl.conf.in (original)
+++ httpd/test/trunk/perl-framework/t/conf/ssl/ssl.conf.in Thu Sep 22 08:38:56 2005
@@ -82,6 +82,9 @@
         Alias /ssl-cgi            @DocumentRoot@/modules/cgi
         Alias /require-ssl-cgi    @DocumentRoot@/modules/cgi
 
+        Alias /require-md5-cgi    @DocumentRoot@/modules/cgi
+        Alias /require-sha-cgi    @DocumentRoot@/modules/cgi
+
         <Location /require/asf>
             SSLVerifyClient require
             SSLVerifyDepth  10
@@ -108,6 +111,14 @@
             SSLOptions +StdEnvVars
             SSLVerifyClient require
             SSLVerifyDepth  10
+        </Location>
+
+        <Location /require-sha-cgi>
+            SSLCipherSuite RC4-SHA
+        </Location>
+
+        <Location /require-md5-cgi>
+            SSLCipherSuite RC4-MD5
         </Location>
 
         <IfModule @AUTH_MODULE@>

Added: httpd/test/trunk/perl-framework/t/ssl/pr12355.t
URL: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/ssl/pr12355.t?rev=290966&view=auto
==============================================================================
--- httpd/test/trunk/perl-framework/t/ssl/pr12355.t (added)
+++ httpd/test/trunk/perl-framework/t/ssl/pr12355.t Thu Sep 22 08:38:56 2005
@@ -0,0 +1,54 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+use Apache::TestUtil;
+
+plan tests => 10, need 'ssl', need_min_apache_version('2.3.0');
+
+Apache::TestRequest::user_agent_keepalive(1);
+Apache::TestRequest::scheme('https');
+
+my $r;
+
+# Send a series of POST requests with varying size request bodies.
+# Alternate between the location which requires a RC4-SHA ciphersuite
+# and one which requires RC5-MD5; mod_ssl will attempt to perform the
+# renegotiation between each request, and hence needs to perform the
+# buffering of request body data.
+
+$r = POST "/require-sha-cgi/perl_echo.pl", content => "hello world";
+
+ok t_cmp($r->code, 200, "renegotiation on POST works");
+ok t_cmp($r->content, "hello world", "request body matches response");
+
+$r = POST "/require-md5-cgi/perl_echo.pl", content => "hello world";
+
+ok t_cmp($r->code, 200, "renegotiation on POST works");
+ok t_cmp($r->content, "hello world", "request body matches response");
+
+$r = POST "/require-sha-cgi/perl_echo.pl", content => 'x'x10000;
+
+ok t_cmp($r->code, 200, "renegotiation on POST works");
+ok t_cmp($r->content, $r->request->content, "request body matches response");
+
+$r = POST "/require-md5-cgi/perl_echo.pl", content => 'x'x60000;
+
+ok t_cmp($r->code, 200, "renegotiation on POST works");
+ok t_cmp($r->content, $r->request->content, "request body matches response");
+
+# Test that content-level input filters are still run as expected by
+# using a request which triggers the mod_case_filter_in:
+
+my @filter = ('X-AddInputFilter' => 'CaseFilterIn'); #mod_client_add_filter
+
+if (have_module('case_filter_in')) {
+    $r = POST "/require-sha-cgi/perl_echo.pl", @filter, content => "hello";
+    
+    ok t_cmp($r->code, 200, "renegotiation on POST works");
+    ok t_cmp($r->content, "HELLO", "request body matches response");
+} else {
+    skip "mod_case_filter_in not available" foreach (1..2);
+}
+