httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1642956 - in /httpd/test/framework/trunk: scripts/uds-test.pl t/conf/extra.conf.in t/modules/proxy.t
Date Tue, 02 Dec 2014 17:08:20 GMT
Author: jim
Date: Tue Dec  2 17:08:20 2014
New Revision: 1642956

URL: http://svn.apache.org/r1642956
Log:
Add simple proxy UDS test

Modified:
    httpd/test/framework/trunk/scripts/uds-test.pl
    httpd/test/framework/trunk/t/conf/extra.conf.in
    httpd/test/framework/trunk/t/modules/proxy.t

Modified: httpd/test/framework/trunk/scripts/uds-test.pl
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/scripts/uds-test.pl?rev=1642956&r1=1642955&r2=1642956&view=diff
==============================================================================
--- httpd/test/framework/trunk/scripts/uds-test.pl (original)
+++ httpd/test/framework/trunk/scripts/uds-test.pl Tue Dec  2 17:08:20 2014
@@ -8,7 +8,7 @@ socket(my $server, PF_UNIX, SOCK_STREAM,
 unlink($socket_path);
 bind($server, $sock_addr) || die "bind: $!"; 
 listen($server,1024) || die "listen: $!";
-while (accept(my $new_sock, $server)) {
+if (accept(my $new_sock, $server)) {
     my $data = <$new_sock>;
 	print $new_sock "HTTP/1.0 200 OK\r\n";
 	print $new_sock "Content-Type: text/html\r\n\r\n";

Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1642956&r1=1642955&r2=1642956&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Tue Dec  2 17:08:20 2014
@@ -258,6 +258,9 @@
       ProxyPass /reverse/notproxy/ !
       ProxyPass /reverse/ http://@SERVERNAME@:@PORT@/
       ProxyPassReverse /reverse/ http://@SERVERNAME@:@PORT@/
+      <IfVersion >= 2.4.7>
+        ProxyPass /uds unix:/tmp/test-ptf.sock|http:
+      </IfVersion>
    </VirtualHost>
 
    <IfVersion >= 2.2.5>

Modified: httpd/test/framework/trunk/t/modules/proxy.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/proxy.t?rev=1642956&r1=1642955&r2=1642956&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/proxy.t (original)
+++ httpd/test/framework/trunk/t/modules/proxy.t Tue Dec  2 17:08:20 2014
@@ -6,7 +6,7 @@ use Apache::TestRequest;
 use Apache::TestUtil;
 use Apache::TestConfig ();
 
-plan tests => 17, need_module 'proxy';
+plan tests => 18, need_module 'proxy';
 
 Apache::TestRequest::module("proxy_http_reverse");
 Apache::TestRequest::user_agent(requests_redirectable => 0);
@@ -82,3 +82,13 @@ if (have_module('alias')) {
     skip "skipping tests without mod_alias" foreach (1..4);
 }
 
+my $pid = fork;
+if ($pid) {
+    system './scripts/uds-test.pl';
+    exit;
+}
+# give time for the system call to take effect
+sleep 2;
+$r = GET("/uds/");
+ok t_cmp($r->code, 200, "ProxyPass UDS path");
+



Mime
View raw message