https://bz.apache.org/bugzilla/show_bug.cgi?id=59829

--- Comment #12 from Yann Ylavic <[email protected]> ---
Comment on attachment 34518
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34518
using apr_itoa for integer conversion, removed comment setting
remoteip-proxy-ip-list

>From attachment 34518 :

>--- 
>httpd-fbc5e20ead005fd3a2bec05924f9e90dfd195406/modules/metadata/mod_remoteip.c 
>    2016-09-13 21:59:18.000000000 +0200
>+++ mod_remoteip.c     2016-12-09 13:51:20.517582087 +0100
[]
>@@ -389,38 +458,75 @@
[]
>+    if (secure) {
>+        apr_table_setn(r->subprocess_env, "HTTPS", "on");
>+        r->server->port = config->secure_port;
>+        r->server->server_scheme = config->secure_scheme;

We really can't do that, r->server is shared between all threads/requests (i.e.
read-only in request processing).

>+        r->parsed_uri.port = r->server->port;
>+        
>+        /* Header available, matched and processed. May be unset now.
>+           When using mod_rewrite, the HTTPS env will be unset, so set
>+           a flag for setting the env var again. */
>+        apr_table_unset(r->headers_in, config->secure_header_name);
>+        apr_table_set(r->connection->notes, "remoteip_env_https", "1");
>+
>+        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
>+                      "Setting scheme https and server's port %d",
>+                      r->server->port);
>     }
>     else {
>-        apr_table_unset(r->headers_in, config->header_name);
>-    }
>-    if (req->proxy_ips) {
>-        apr_table_setn(r->notes, "remoteip-proxy-ip-list", req->proxy_ips);
>-        if (config->proxies_header_name) {
>-            apr_table_setn(r->headers_in, config->proxies_header_name,
>-                           req->proxy_ips);
>-        }
>+        r->server->port = config->orig_port;
>+        r->server->server_scheme = config->orig_scheme;

Likewise.

>     }
>

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to