httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r411777 - in /httpd/test/trunk/perl-framework/t: apache/pr37166.t htdocs/modules/cgi/ htdocs/modules/cgi/pr37166.pl.PL
Date Mon, 05 Jun 2006 13:03:43 GMT
Author: jorton
Date: Mon Jun  5 06:03:43 2006
New Revision: 411777

URL: http://svn.apache.org/viewvc?rev=411777&view=rev
Log:
- add test case for PR 37166.

Added:
    httpd/test/trunk/perl-framework/t/apache/pr37166.t
    httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/pr37166.pl.PL
Modified:
    httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/   (props changed)

Added: httpd/test/trunk/perl-framework/t/apache/pr37166.t
URL: http://svn.apache.org/viewvc/httpd/test/trunk/perl-framework/t/apache/pr37166.t?rev=411777&view=auto
==============================================================================
--- httpd/test/trunk/perl-framework/t/apache/pr37166.t (added)
+++ httpd/test/trunk/perl-framework/t/apache/pr37166.t Mon Jun  5 06:03:43 2006
@@ -0,0 +1,29 @@
+#
+# Regression test for PR 37166
+#
+# r370692 determined that a CGI script which outputs an explicit
+# "Status: 200" will not be subject to conditional request processing.
+# Previous behaviour was the opposite, but fell foul of the r->status
+# vs r->status_line issue fixed in r385581.
+#
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+use Apache::TestUtil;
+
+plan tests => 4, need 'cgi';
+
+my $uri = '/modules/cgi/pr37166.pl';
+
+my $r = GET $uri;
+
+ok t_cmp($r->code, 200, "SSI was allowed for location");
+ok t_cmp($r->content, "Hello world\n", "file was served with correct content");
+
+$r = GET $uri, "If-Modified-Since" => "Tue, 15 Feb 2005 15:00:00 GMT";
+
+ok t_cmp($r->code, 200, "explicit 200 response");
+ok t_cmp($r->content, "Hello world\n", 
+         "file was again served with correct content");

Propchange: httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jun  5 06:03:43 2006
@@ -14,3 +14,4 @@
 not-modified.pl
 nph-102.pl
 empty.pl
+pr37166.pl

Added: httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/pr37166.pl.PL
URL: http://svn.apache.org/viewvc/httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/pr37166.pl.PL?rev=411777&view=auto
==============================================================================
--- httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/pr37166.pl.PL (added)
+++ httpd/test/trunk/perl-framework/t/htdocs/modules/cgi/pr37166.pl.PL Mon Jun  5 06:03:43
2006
@@ -0,0 +1,8 @@
+print <<EOT
+Status: 200
+Last-Modified: Tue, 15 Feb 2005 15:00:00 GMT
+Content-Type: text/html
+
+Hello world
+EOT
+;



Mime
View raw message