[mirrorbrain-commits] [mod_asn] r96 - /trunk/mod_asn.c

From: <poeml_at_mirrorbrain.org>
Date: Fri, 03 Jan 2014 01:07:58 -0000
Author: poeml
Date: Fri Jan  3 02:07:58 2014
New Revision: 96

URL: http://svn.mirrorbrain.org/viewvc/mod_asn?rev=96&view=rev
Log:
Adjust for API change in Apache 2.4: 
conn_rec->remote_ip is now request_rec->useragent_ip, if the actual clients IP
is wanted, and not one of a connecting proxy.
https://httpd.apache.org/docs/2.4/developer/new_api_2_4.html

Modified:
    trunk/mod_asn.c

Modified: trunk/mod_asn.c
URL: http://svn.mirrorbrain.org/viewvc/mod_asn/trunk/mod_asn.c?rev=96&r1=95&r2=96&view=diff
==============================================================================
--- trunk/mod_asn.c	(original)
+++ trunk/mod_asn.c	Fri Jan  3 02:07:58 2014
_at_@ -307,7 +307,11 @@
         clientip = apr_table_get(r->subprocess_env, scfg->ip_envvar);
         debugLog(r, cfg, "client ip from %s envvar: %s", scfg->ip_envvar, clientip);
     } else {
+#if AP_MODULE_MAGIC_AT_LEAST(20111130, 0)
+        clientip = apr_pstrdup(r->pool, r->useragent_ip);
+#else
         clientip = apr_pstrdup(r->pool, r->connection->remote_ip);
+#endif
     }
 
     if (!clientip) {




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Fri Jan 03 2014 - 01:08:01 GMT

This archive was generated by hypermail 2.3.0 : Fri Jan 03 2014 - 01:17:08 GMT