perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/ModPerl-Registry/t basic.t
Date Sat, 08 Mar 2003 09:47:01 GMT
stas        2003/03/08 01:47:00

  Modified:    ModPerl-Registry/t basic.t
  Added:       ModPerl-Registry/t/cgi-bin send_headers.html
  Log:
  test that files with .html extension, which are configured to run as
  scripts get the headerparse stage working: the default mime handler sets
  $r->content_type for .html files, so we can't rely on content_type not
  being set in making the decision whether to parse headers or not
  
  Revision  Changes    Path
  1.1                  modperl-2.0/ModPerl-Registry/t/cgi-bin/send_headers.html
  
  Index: send_headers.html
  ===================================================================
  print "Content-type: text/plain\n\n";
  print "ok";
  
  
  
  
  1.11      +18 -2     modperl-2.0/ModPerl-Registry/t/basic.t
  
  Index: basic.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/basic.t,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- basic.t	8 Mar 2003 03:20:36 -0000	1.10
  +++ basic.t	8 Mar 2003 09:47:00 -0000	1.11
  @@ -3,7 +3,7 @@
   
   use Apache::Test;
   use Apache::TestUtil;
  -use Apache::TestRequest qw(GET_BODY HEAD);
  +use Apache::TestRequest qw(GET GET_BODY HEAD);
   
   my %modules = (
       registry    => 'ModPerl::Registry',
  @@ -13,7 +13,7 @@
   
   my @aliases = sort keys %modules;
   
  -plan tests => @aliases * 4 + 2;
  +plan tests => @aliases * 4 + 3;
   
   # very basic compilation/response test
   for my $alias (@aliases) {
  @@ -76,5 +76,21 @@
           "ok",
           GET_BODY($url),
           "\$r->content_type('text/plain')",
  +    );
  +}
  +
  +
  +# test that files with .html extension, which are configured to run as
  +# scripts get the headerparse stage working: the default mime handler
  +# sets $r->content_type for .html files, so we can't rely on
  +# content_type not being set in making the decision whether to parse
  +# headers or not
  +{
  +    my $url = "/registry/send_headers.html";
  +    my $res = GET $url;
  +    ok t_cmp(
  +        "text/plain",
  +        $res->content_type,
  +        "script's content-type",
       );
   }
  
  
  

Mime
View raw message