public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in www-apache/mod_geoip2/files: mod_geoip2-1.2.7-httpd24.patch
@ 2013-01-03 19:15 Pacho Ramos (pacho)
  0 siblings, 0 replies; only message in thread
From: Pacho Ramos (pacho) @ 2013-01-03 19:15 UTC (permalink / raw
  To: gentoo-commits

pacho       13/01/03 19:15:56

  Added:                mod_geoip2-1.2.7-httpd24.patch
  Log:
  Apply fedora patch to fix apache 2.4 compat
  
  (Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

Revision  Changes    Path
1.1                  www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch?rev=1.1&content-type=text/plain

Index: mod_geoip2-1.2.7-httpd24.patch
===================================================================
--- mod_geoip.c.geoip
+++ mod_geoip.c
@@ -66,6 +66,7 @@
 #include "http_config.h"
 #include "http_protocol.h"
 #include "http_log.h"
+#include "util_script.h"
 #include "ap_config.h"
 #include "apr_strings.h"
 #include <GeoIP.h>
@@ -320,7 +321,11 @@
 		return DECLINED;
 
 	if (!cfg->scanProxyHeaders) {
+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
+		ipaddr = r->useragent_ip;
+#else
 		ipaddr = r->connection->remote_ip;
+#endif
 	}
 	else {
 		ap_add_common_vars(r);
@@ -338,7 +343,11 @@
 		}
 		if (!ipaddr_ptr) {
 			ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: Error while getting ipaddr from proxy headers. Using REMOTE_ADDR.");
-			ipaddr = r->connection->remote_ip;
+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
+			ipaddr = r->useragent_ip;
+#else
+	                ipaddr = r->connection->remote_ip;
+#endif
 		}
 		else {
 			ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr);





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-03 19:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 19:15 [gentoo-commits] gentoo-x86 commit in www-apache/mod_geoip2/files: mod_geoip2-1.2.7-httpd24.patch Pacho Ramos (pacho)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox