httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1608999 - /httpd/httpd/trunk/modules/proxy/mod_proxy.c
Date Wed, 09 Jul 2014 03:47:31 GMT
Author: jailletc36
Date: Wed Jul  9 03:47:31 2014
New Revision: 1608999

URL: http://svn.apache.org/r1608999
Log:
s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1608999&r1=1608998&r2=1608999&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Wed Jul  9 03:47:31 2014
@@ -548,9 +548,9 @@ static const char *proxy_interpolate(req
         return str;
     }
     /* OK, this is syntax we want to interpolate.  Is there such a var ? */
-    var = apr_pstrndup(r->pool, start+2, end-(start+2));
+    var = apr_pstrmemdup(r->pool, start+2, end-(start+2));
     val = apr_table_get(r->subprocess_env, var);
-    firstpart = apr_pstrndup(r->pool, str, (start-str));
+    firstpart = apr_pstrmemdup(r->pool, str, (start-str));
 
     if (val == NULL) {
         return apr_pstrcat(r->pool, firstpart,
@@ -1044,7 +1044,7 @@ static int proxy_handler(request_rec *r)
             return HTTP_MOVED_PERMANENTLY;
     }
 
-    scheme = apr_pstrndup(r->pool, uri, p - uri);
+    scheme = apr_pstrmemdup(r->pool, uri, p - uri);
     /* Check URI's destination host against NoProxy hosts */
     /* Bypass ProxyRemote server lookup if configured as NoProxy */
     for (direct_connect = i = 0; i < conf->dirconn->nelts &&



Mime
View raw message