]> granicus.if.org Git - apache/commitdiff
Save a few cycles
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 23 Aug 2013 21:19:21 +0000 (21:19 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 23 Aug 2013 21:19:21 +0000 (21:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1517045 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_http.c

index 892aa2f3b84bfa8f714aac654af790c67da6b75d..e7f7dd23204c242e1e8923087ad84e5a658276c0 100644 (file)
@@ -1871,7 +1871,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
        return DECLINED;
     if ((u - url) > 14)
         return HTTP_BAD_REQUEST;
-    scheme = apr_pstrndup(p, url, u - url);
+    scheme = apr_pstrmemdup(p, url, u - url);
     /* scheme is lowercase */
     ap_str_tolower(scheme);
     /* is it for us? */