altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

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

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