httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/ssl proxy.t
Date Tue, 02 Apr 2002 20:30:49 GMT
dougm       02/04/02 12:30:49

  Modified:    perl-framework/t/ssl proxy.t
  Log:
  add test for ProxyPassReverse
  
  Revision  Changes    Path
  1.7       +17 -1     httpd-test/perl-framework/t/ssl/proxy.t
  
  Index: proxy.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/ssl/proxy.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- proxy.t	2 Apr 2002 18:33:05 -0000	1.6
  +++ proxy.t	2 Apr 2002 20:30:49 -0000	1.7
  @@ -17,7 +17,7 @@
   my $post_tests = have_module($post_module) ?
     Apache::TestCommon::run_post_test_sizes() : 0;
   
  -plan tests => (6 + $post_tests) * $num_modules, ['mod_proxy'];
  +plan tests => (7 + $post_tests) * $num_modules, ['mod_proxy'];
   
   for my $module (sort keys %modules) {
   
  @@ -70,6 +70,22 @@
           t_cmp('client_ok',
                 $vars{SSL_CLIENT_S_DN_CN},
                 "client subject common name");
  +    };
  +
  +    sok {
  +        #test that ProxyPassReverse rewrote the Location header
  +        #to use the frontend server rather than downstream server
  +        my $uri = '/modules';
  +        my $ruri = Apache::TestRequest::resolve_url($uri) . '/';
  +
  +        #tell lwp not to follow redirect so we can see the Location header
  +        local $Apache::TestRequest::RedirectOK = 0;
  +
  +        $res = GET($uri);
  +
  +        my $location = $res->header('Location') || 'NONE';
  +
  +        t_cmp($ruri, $location, 'ProxyPassReverse Location rewrite');
       };
   
       Apache::TestCommon::run_post_test($post_module) if $post_tests;
  
  
  

Mime
View raw message