altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-rewrite-clientaddr.patch

75a229
--- a/modules/mappers/mod_rewrite.c	2014/01/28 19:40:17	1562174
75a229
+++ b/modules/mappers/mod_rewrite.c	2014/02/10 18:54:23	1566702
75a229
@@ -2139,7 +2139,10 @@
75a229
             break;
75a229
 
75a229
         case 16:
75a229
-            if (!strcmp(var, "REQUEST_FILENAME")) {
75a229
+            if (*var == 'C' && !strcmp(var, "CONN_REMOTE_ADDR")) {
75a229
+                result = r->connection->client_ip;
75a229
+            }
75a229
+            else if (!strcmp(var, "REQUEST_FILENAME")) {
75a229
                 result = r->filename; /* same as script_filename (15) */
75a229
             }
75a229
             break;