Commit 6107cd44fe4f7d7f8c63d68990ff460e89c81515

Authored by Georg Hopp
1 parent b48e03b7

conditional compile for apache 2.2 and 2.4 / client_ip vs. remote_ip

Showing 1 changed file with 5 additions and 3 deletions
@@ -98,9 +98,11 @@ entropy_filter_in( @@ -98,9 +98,11 @@ entropy_filter_in(
98 /** 98 /**
99 * add client ip to sha1 99 * add client ip to sha1
100 */ 100 */
101 - remote_ip = (ap_version.minor < 4)?  
102 - connection->remote_ip:  
103 - connection->client_ip; 101 +#if 4 > HTTP_VERSION_MINOR(number)
  102 + remote_ip = connection->remote_ip;
  103 +#else
  104 + remote_ip = connection->client_ip;
  105 +#endif
104 106
105 apr_sha1_update(&sha1_ctx, remote_ip, strlen(remote_ip)); 107 apr_sha1_update(&sha1_ctx, remote_ip, strlen(remote_ip));
106 108
Please register or login to post a comment