You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@apache.org on 2016/12/30 19:06:56 UTC

svn commit: r1776624 - in /httpd/httpd/trunk: docs/manual/mod/ modules/filters/ modules/metadata/

Author: druggeri
Date: Fri Dec 30 19:06:55 2016
New Revision: 1776624

URL: http://svn.apache.org/viewvc?rev=1776624&view=rev
Log:
Shorten RemoteIPProxyProtocolEnable to RemoteIPProxyProtocol and correct references in docs

Removed:
    httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.html
    httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.html.en
    httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml
    httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml.meta
    httpd/httpd/trunk/modules/filters/mod_proxy_protocol.c
Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_remoteip.xml
    httpd/httpd/trunk/modules/metadata/mod_remoteip.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_remoteip.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_remoteip.xml?rev=1776624&r1=1776623&r2=1776624&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_remoteip.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_remoteip.xml Fri Dec 30 19:06:55 2016
@@ -44,8 +44,8 @@ via the request headers.
 
     <p>Additionally, this module implements the server side of
     HAProxy's
-    <a href="http://blog.haproxy.com/haproxy/proxy-protocol/">Proxy Protocol</a> when
-    using the <directive module="mod_remoteip">RemoteIPProxyProtocolEnable</directive>
+    <a href="http://blog.haproxy.com/haproxy/proxy-protocol/">PROXY Protocol</a> when
+    using the <directive module="mod_remoteip">RemoteIPProxyProtocol</directive>
     directive.</p>
 
     <p>Once replaced as instructed, this overridden useragent IP address is
@@ -223,26 +223,26 @@ RemoteIPProxiesHeader X-Forwarded-By
 
 <directivesynopsis>
 <name>RemoteIPProxyProtocol</name>
-<description>Enable, optionally enable or disable the proxy protocol handling</description>
-<syntax>ProxyProtocol On|Optional|Off</syntax>
+<description>Enable, optionally enable or disable the PROXY protocol handling</description>
+<syntax>RemoteIPProxyProtocol On|Optional|Off</syntax>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
 
 <usage>
-    <p>The <directive>RemoteIPProxyProtocolEnable</directive> enables or 
-    disables the reading and handling of the proxy protocol connection header.
+    <p>The <directive>RemoteIPProxyProtocol</directive> enables or 
+    disables the reading and handling of the PROXY protocol connection header.
     If enabled with the <code>On</code> flag, the upstream client <em>must</em>
     send the header every time it opens a connection or the connection will
     be aborted. If enabled with the <code>Optional</code> flag, the upstream
     client <em>may</em> send the header.</p>
 
     <p>While this directive may be specified in any virtual host, it is
-    important to understand that because the proxy protocol is connection
+    important to understand that because the PROXY protocol is connection
     based and protocol agnostic, the enabling and disabling is actually based
     on ip-address and port. This means that if you have multiple name-based
     virtual hosts for the same host and port, and you enable it any one of
     them, then it is enabled for all them (with that host and port). It also
-    means that if you attempt to enable the proxy protocol in one and disable
+    means that if you attempt to enable the PROXY protocol in one and disable
     in the other, that won't work; in such a case the last one wins and a
     notice will be logged indicating which setting was being overridden.</p>
 
@@ -258,26 +258,26 @@ RemoteIPProxiesHeader X-Forwarded-By
 Listen 80
 &lt;VirtualHost *:80&gt;
     ServerName www.example.com
-    RemoteIPProxyProtocolEnable Optional
+    RemoteIPProxyProtocol Optional
 
     #Requests to this virtual host may optionally not have
-    # a proxy protocol header provided
+    # a PROXY protocol header provided
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost *:80&gt;
     ServerName www.example.com
-    RemoteIPProxyProtocolEnable On
+    RemoteIPProxyProtocol On
 
-    #Requests to this virtual host must have a proxy protocol
+    #Requests to this virtual host must have a PROXY protocol
     # header provided. If it is missing, a 400 will result
 &lt;/VirtualHost&gt;
 
 Listen 8080
 &lt;VirtualHost *:8080&gt;
     ServerName www.example.com
-    RemoteIPProxyProtocolEnable On
+    RemoteIPProxyProtocol On
 
-    #Requests to this virtual host must have a proxy protocol
+    #Requests to this virtual host must have a PROXY protocol
     # header provided. If it is missing, the connection will
     # be aborted
 &lt;/VirtualHost&gt;

Modified: httpd/httpd/trunk/modules/metadata/mod_remoteip.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_remoteip.c?rev=1776624&r1=1776623&r2=1776624&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_remoteip.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_remoteip.c Fri Dec 30 19:06:55 2016
@@ -369,7 +369,7 @@ static void remoteip_warn_enable_conflic
     apr_sockaddr_ip_getbuf(buf, sizeof(buf), prev->addr);
 
     ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, new, APLOGNO(03491)
-                 "RemoteIPProxyProtocolEnable: previous setting for %s:%hu from virtual "
+                 "RemoteIPProxyProtocol: previous setting for %s:%hu from virtual "
                  "host {%s:%hu in %s} is being overriden by virtual host "
                  "{%s:%hu in %s}; new setting is '%s'",
                  buf, prev->addr->port, prev->source->server_hostname,
@@ -412,7 +412,7 @@ static const char *remoteip_enable_proxy
         rem_list[1] = &global_conf->proxy_protocol_optional;
     }
     else {
-        return apr_pstrcat(cmd->pool, "Unrecognized option for ProxyProtocolEnable `%s'", arg, NULL);
+        return apr_pstrcat(cmd->pool, "Unrecognized option for RemoteIPProxyProtocol `%s'", arg, NULL);
     }
 
     for (addr = cmd->server->addrs; addr; addr = addr->next) {
@@ -1008,7 +1008,7 @@ static int remoteip_determine_version(co
     }
 }
 
-/* Capture the first bytes on the protocol and parse the proxy protocol header.
+/* Capture the first bytes on the protocol and parse the PROXY protocol header.
  * Removes itself when the header is complete.
  */
 static apr_status_t remoteip_input_filter(ap_filter_t *f,
@@ -1211,7 +1211,7 @@ static const command_rec remoteip_cmds[]
                   RSRC_CONF | EXEC_ON_READ,
                   "The filename to read the list of internal proxies, "
                   "see the RemoteIPInternalProxy directive"),
-    AP_INIT_TAKE1("RemoteIPProxyProtocolEnable", remoteip_enable_proxy_protocol, NULL,
+    AP_INIT_TAKE1("RemoteIPProxyProtocol", remoteip_enable_proxy_protocol, NULL,
                   RSRC_CONF, "Enable proxy-protocol handling (`on', `off')"),
     { NULL }
 };