httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r126278 - /httpd/test/trunk/perl-framework/t/htdocs/php/lookup.php /httpd/test/trunk/perl-framework/t/htdocs/php/lookup2.php /httpd/test/trunk/perl-framework/t/htdocs/php/target.php /httpd/test/trunk/perl-framework/t/php/lookup.t
Date Mon, 24 Jan 2005 11:33:52 GMT
Author: jorton
Date: Mon Jan 24 03:33:49 2005
New Revision: 126278

URL: http://svn.apache.org/viewcvs?view=rev&rev=126278
Log:
Add test for apache_lookup_uri and regression introduced
by the virtual() response flushing workaround.

Added:
   httpd/test/trunk/perl-framework/t/htdocs/php/lookup.php
   httpd/test/trunk/perl-framework/t/htdocs/php/lookup2.php
   httpd/test/trunk/perl-framework/t/htdocs/php/target.php
   httpd/test/trunk/perl-framework/t/php/lookup.t

Added: httpd/test/trunk/perl-framework/t/htdocs/php/lookup.php
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/htdocs/php/lookup.php?view=auto&rev=126278
==============================================================================
--- (empty file)
+++ httpd/test/trunk/perl-framework/t/htdocs/php/lookup.php	Mon Jan 24 03:33:49 2005
@@ -0,0 +1,5 @@
+<?php 
+$r = apache_lookup_uri("target.php");
+printf("status=%d:method=%s:uri=%s",
+       $r->status, $r->method, $r->uri);
+?>

Added: httpd/test/trunk/perl-framework/t/htdocs/php/lookup2.php
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/htdocs/php/lookup2.php?view=auto&rev=126278
==============================================================================
--- (empty file)
+++ httpd/test/trunk/perl-framework/t/htdocs/php/lookup2.php	Mon Jan 24 03:33:49 2005
@@ -0,0 +1,8 @@
+<?php 
+header("X-Before: foobar");
+$r = apache_lookup_uri("target.php");
+header("X-After: foobar");
+
+printf("status=%d:method=%s:uri=%s",
+       $r->status, $r->method, $r->uri);
+?>

Added: httpd/test/trunk/perl-framework/t/htdocs/php/target.php
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/htdocs/php/target.php?view=auto&rev=126278
==============================================================================
--- (empty file)
+++ httpd/test/trunk/perl-framework/t/htdocs/php/target.php	Mon Jan 24 03:33:49 2005
@@ -0,0 +1 @@
+<?php echo "target.php"; ?>
\ No newline at end of file

Added: httpd/test/trunk/perl-framework/t/php/lookup.t
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/php/lookup.t?view=auto&rev=126278
==============================================================================
--- (empty file)
+++ httpd/test/trunk/perl-framework/t/php/lookup.t	Mon Jan 24 03:33:49 2005
@@ -0,0 +1,29 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+use Apache::TestUtil;
+
+plan tests => 4, need_php;
+
+my $expect = "status=200:method=GET:uri=/php/target.php";
+
+my $r = GET_BODY "/php/lookup.php";
+
+chomp $r;
+
+ok t_cmp($r, $expect, "apache_lookup_uri results OK");
+
+# regression test for http://bugs.php.net/bug.php?id=31645
+$r = GET("/php/lookup2.php");
+
+ok t_cmp($r->header("X-Before"), "foobar", "header set before apache_lookup_uri");
+ok t_cmp($r->header("X-After"), "foobar", "header set after apache_lookup_uri");
+
+my $c = $r->content;
+
+chomp $c;
+
+ok t_cmp($c, $expect, "second apache_lookup_uri results");
+

Mime
View raw message