~ubuntu-branches/ubuntu/utopic/libapache2-mod-rpaf/utopic

« back to all changes in this revision

Viewing changes to debian/patches/011_apache2.4.patch

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2013-06-16 15:23:44 UTC
  • mfrom: (5.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130616152344-2ualjl6nd7akwl6h
Tags: 0.6-11
Repackage from experimental to sid (Closes: #709463)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Apache 2.4 compatibility patch
 
2
Author: Sergey B Kirpichev <skirpichev@gmail.com>
 
3
Bug-Debian: http://bugs.debian.org/666792
 
4
 
 
5
---
 
6
 mod_rpaf-2.0.c |   12 ++++++------
 
7
 1 file changed, 6 insertions(+), 6 deletions(-)
 
8
 
 
9
--- a/mod_rpaf-2.0.c
 
10
+++ b/mod_rpaf-2.0.c
 
11
@@ -147,8 +147,8 @@
 
12
 
 
13
 static apr_status_t rpaf_cleanup(void *data) {
 
14
     rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data;
 
15
-    rcr->r->connection->remote_ip   = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
 
16
-    rcr->r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->remote_ip);
 
17
+    rcr->r->connection->client_ip   = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
 
18
+    rcr->r->connection->client_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->client_ip);
 
19
     return APR_SUCCESS;
 
20
 }
 
21
 
 
22
@@ -171,7 +171,7 @@
 
23
     if (!cfg->enable)
 
24
         return DECLINED;
 
25
 
 
26
-    if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1) {
 
27
+    if (is_in_array(r->connection->client_ip, cfg->proxy_ips) == 1) {
 
28
         /* check if cfg->headername is set and if it is use
 
29
            that instead of X-Forwarded-For by default */
 
30
         if (cfg->headername && (fwdvalue = apr_table_get(r->headers_in, cfg->headername))) {
 
31
@@ -190,11 +190,11 @@
 
32
                 if (*fwdvalue != '\0')
 
33
                     ++fwdvalue;
 
34
             }
 
35
-            rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip);
 
36
+            rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->client_ip);
 
37
             rcr->r = r;
 
38
             apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null);
 
39
-            r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
 
40
-            r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip);
 
41
+            r->connection->client_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
 
42
+            r->connection->client_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->client_ip);
 
43
             if (cfg->sethostname) {
 
44
                 const char *hostvalue;
 
45
                 if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) {