httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1592615 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_scgi.c proxy_util.c scgi.h
Date Mon, 05 May 2014 19:26:34 GMT
Author: trawick
Date: Mon May  5 19:26:33 2014
New Revision: 1592615

URL: http://svn.apache.org/r1592615
Log:
Follow-up to r1592529:

Define default port for "scgi" schemes (as chosen by
mod_proxy_scgi) in a common location.

Suggested by: jailletc36

Added:
    httpd/httpd/trunk/modules/proxy/scgi.h   (with props)
Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c?rev=1592615&r1=1592614&r2=1592615&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c Mon May  5 19:26:33 2014
@@ -37,13 +37,13 @@
 #include "util_script.h"
 
 #include "mod_proxy.h"
+#include "scgi.h"
 
 
 #define SCHEME "scgi"
 #define PROXY_FUNCTION "SCGI"
 #define SCGI_MAGIC "SCGI"
 #define SCGI_PROTOCOL_VERSION "1"
-#define SCGI_DEFAULT_PORT (4000)
 
 /* just protect from typos */
 #define CONTENT_LENGTH "CONTENT_LENGTH"
@@ -183,7 +183,7 @@ static int scgi_canon(request_rec *r, ch
     }
     url += sizeof(SCHEME); /* Keep slashes */
 
-    port = def_port = SCGI_DEFAULT_PORT;
+    port = def_port = SCGI_DEF_PORT;
 
     err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
     if (err) {

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1592615&r1=1592614&r2=1592615&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Mon May  5 19:26:33 2014
@@ -22,6 +22,7 @@
 #include "apr_hash.h"
 #include "proxy_util.h"
 #include "ajp.h"
+#include "scgi.h"
 
 #if APR_HAVE_UNISTD_H
 #include <unistd.h>         /* for getpid() */
@@ -3514,7 +3515,7 @@ static proxy_schemes_t pschemes[] =
 {
     {"fcgi",     8000},
     {"ajp",      AJP13_DEF_PORT},
-    {"scgi",     4000},
+    {"scgi",     SCGI_DEF_PORT},
     { NULL, 0xFFFF }     /* unknown port */
 };
 

Added: httpd/httpd/trunk/modules/proxy/scgi.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/scgi.h?rev=1592615&view=auto
==============================================================================
--- httpd/httpd/trunk/modules/proxy/scgi.h (added)
+++ httpd/httpd/trunk/modules/proxy/scgi.h Mon May  5 19:26:33 2014
@@ -0,0 +1,34 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file scgi.h
+ * @brief Shared SCGI-related definitions
+ *
+ * @ingroup APACHE_INTERNAL
+ * @{
+ */
+
+#ifndef SCGI_H
+#define SCGI_H
+
+/* This is not defined by the protocol.  It is a convention
+ * of mod_proxy_scgi, and mod_proxy utility routines must
+ * use the same value as mod_proxy_scgi.
+ */
+#define SCGI_DEF_PORT 4000
+
+#endif /* SCGI_H */

Propchange: httpd/httpd/trunk/modules/proxy/scgi.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message