httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1180654 - in /httpd/httpd/trunk: include/ap_mmn.h modules/proxy/NWGNUproxy modules/proxy/mod_proxy.h modules/proxy/proxy_util.c
Date Sun, 09 Oct 2011 17:07:17 GMT
Author: sf
Date: Sun Oct  9 17:07:17 2011
New Revision: 1180654

URL: http://svn.apache.org/viewvc?rev=1180654&view=rev
Log:
Remove ap_proxy_removestr(). It has been unused for a decade and has quadratic
memory usage.

Modified:
    httpd/httpd/trunk/include/ap_mmn.h
    httpd/httpd/trunk/modules/proxy/NWGNUproxy
    httpd/httpd/trunk/modules/proxy/mod_proxy.h
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=1180654&r1=1180653&r2=1180654&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Sun Oct  9 17:07:17 2011
@@ -356,14 +356,15 @@
  *                         ap_realloc()
  * 20110724.9 (2.3.15-dev) add ap_varbuf_pdup() and ap_varbuf_regsub()
  * 20110724.10(2.3.15-dev) Export ap_max_mem_free
+ * 20111009.0 (2.3.15-dev) Remove ap_proxy_removestr()
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20110724
+#define MODULE_MAGIC_NUMBER_MAJOR 20111009
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 10                   /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0                   /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a

Modified: httpd/httpd/trunk/modules/proxy/NWGNUproxy
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/NWGNUproxy?rev=1180654&r1=1180653&r2=1180654&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/NWGNUproxy (original)
+++ httpd/httpd/trunk/modules/proxy/NWGNUproxy Sun Oct  9 17:07:17 2011
@@ -306,7 +306,6 @@ $(OBJDIR)/mod_proxy.imp:
 	@echo $(DL) ap_proxy_pre_http_request,$(DL)>> $@
 	@echo $(DL) ap_proxy_pre_request,$(DL)>> $@
 	@echo $(DL) ap_proxy_release_connection,$(DL)>> $@
-	@echo $(DL) ap_proxy_removestr,$(DL)>> $@
 	@echo $(DL) ap_proxy_retry_worker,$(DL)>> $@
 	@echo $(DL) ap_proxy_sec2hex,$(DL)>> $@
 	@echo $(DL) ap_proxy_set_wstatus,$(DL)>> $@

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?rev=1180654&r1=1180653&r2=1180654&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Sun Oct  9 17:07:17 2011
@@ -523,7 +523,6 @@ PROXY_DECLARE(char *)ap_proxy_canon_netl
                                            char **passwordp, char **hostp, apr_port_t *port);
 PROXY_DECLARE(const char *)ap_proxy_date_canon(apr_pool_t *p, const char *x);
 PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val);
-PROXY_DECLARE(char *)ap_proxy_removestr(apr_pool_t *pool, const char *list, const char *val);
 PROXY_DECLARE(int) ap_proxy_hex2sec(const char *x);
 PROXY_DECLARE(void) ap_proxy_sec2hex(int t, char *y);
 PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message);

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1180654&r1=1180653&r2=1180654&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Sun Oct  9 17:07:17 2011
@@ -435,51 +435,6 @@ PROXY_DECLARE(int) ap_proxy_liststr(cons
 }
 
 /*
- * list is a comma-separated list of case-insensitive tokens, with
- * optional whitespace around the tokens.
- * if val appears on the list of tokens, it is removed from the list,
- * and the new list is returned.
- */
-PROXY_DECLARE(char *)ap_proxy_removestr(apr_pool_t *pool, const char *list, const char *val)
-{
-    int len, i;
-    const char *p;
-    char *new = NULL;
-
-    len = strlen(val);
-
-    while (list != NULL) {
-        p = ap_strchr_c(list, ',');
-        if (p != NULL) {
-            i = p - list;
-            do {
-                p++;
-            } while (apr_isspace(*p));
-        }
-        else {
-            i = strlen(list);
-        }
-
-        while (i > 0 && apr_isspace(list[i - 1])) {
-            i--;
-        }
-        if (i == len && strncasecmp(list, val, len) == 0) {
-            /* do nothing */
-        }
-        else {
-            if (new) {
-                new = apr_pstrcat(pool, new, ",", apr_pstrndup(pool, list, i), NULL);
-            }
-            else {
-                new = apr_pstrndup(pool, list, i);
-            }
-        }
-        list = p;
-    }
-    return new;
-}
-
-/*
  * Converts 8 hex digits to a time integer
  */
 PROXY_DECLARE(int) ap_proxy_hex2sec(const char *x)



Mime
View raw message