]> granicus.if.org Git - apache/commitdiff
Merge r1592529 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 7 May 2014 12:53:37 +0000 (12:53 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 7 May 2014 12:53:37 +0000 (12:53 +0000)
mod_proxy_scgi: Support Unix sockets.

ap_proxy_port_of_scheme(): Support default SCGI port (4000).

Submitted by: trawick
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1593004 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/proxy/mod_proxy_scgi.c
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 180b4d09d0c568c578767e566c069aea3b67213e..2a121b1f5b9f0a4939cc9c8754a8366e2c74e131 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.10
 
+  *) mod_proxy_scgi: Support Unix sockets.  ap_proxy_port_of_scheme():
+     Support default SCGI port (4000).  [Jeff Trawick]
+
   *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive
      is enabled.  [Eric Covener]
 
diff --git a/STATUS b/STATUS
index 4a872916aef5f937f784b4462cecf2572f7f6f6b..54c353428ef2010b2776d5dea1e39aeef28916f5 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,10 +100,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy_scgi: Support Unix sockets
-     httpd patch: http://svn.apache.org/r1592529
-     2.4.x patch: trunk patch works modulo CHANGES
-     +1: trawick, ylavic, jim
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index f77a986e2834f489b7897da846f5dbccc3dc19e3..6deae7888331b99e20d28e9a8b20b60aba8deb09 100644 (file)
@@ -176,13 +176,15 @@ static int scgi_canon(request_rec *r, char *url)
 {
     char *host, sport[sizeof(":65535")];
     const char *err, *path;
-    apr_port_t port = SCGI_DEFAULT_PORT;
+    apr_port_t port, def_port;
 
     if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
         return DECLINED;
     }
     url += sizeof(SCHEME); /* Keep slashes */
 
+    port = def_port = SCGI_DEFAULT_PORT;
+
     err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
     if (err) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
@@ -190,7 +192,12 @@ static int scgi_canon(request_rec *r, char *url)
         return HTTP_BAD_REQUEST;
     }
 
-    apr_snprintf(sport, sizeof(sport), ":%u", port);
+    if (port != def_port) {
+        apr_snprintf(sport, sizeof(sport), ":%u", port);
+    }
+    else {
+        sport[0] = '\0';
+    }
 
     if (ap_strchr(host, ':')) { /* if literal IPv6 address */
         host = apr_pstrcat(r->pool, "[", host, "]", NULL);
index 741830c0b8f70a1d7dce01e1e0f04f48722e8c2a..3dd12ca32921a77950642dd57d110d181b185caf 100644 (file)
@@ -3487,6 +3487,7 @@ static proxy_schemes_t pschemes[] =
 {
     {"fcgi",     8000},
     {"ajp",      AJP13_DEF_PORT},
+    {"scgi",     4000},
     { NULL, 0xFFFF }     /* unknown port */
 };