Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 13315 invoked by uid 500); 29 Jul 2001 17:53:03 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 13304 invoked from network); 29 Jul 2001 17:53:03 -0000 Date: Sun, 29 Jul 2001 10:50:11 -0700 From: Brian Pane Subject: [PATCH] remove some more strdup calls To: new-httpd Message-id: <3B644CD3.9050300@pacbell.net> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_icGaszWuI3jrth+gs6TTIw)" X-Accept-Language: en-us User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010628 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This is a multi-part message in MIME format. --Boundary_(ID_icGaszWuI3jrth+gs6TTIw) Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT Here's another small performance patch to remove calls to apr_pstrdup, this time in location_walk. --Brian Index: server/request.c =================================================================== RCS file: /home/cvspublic/httpd-2.0/server/request.c,v retrieving revision 1.14 diff -u -r1.14 request.c --- server/request.c 2001/06/27 23:18:30 1.14 +++ server/request.c 2001/07/29 17:42:45 @@ -665,11 +665,8 @@ * LocationMatch doesn't. An exception, for backwards brokenness is * absoluteURIs... in which case neither match multiple slashes. */ - if (r->uri[0] != '/') { - test_location = r->uri; - } - else { - test_location = apr_pstrdup(r->pool, r->uri); + test_location = r->uri; + if (test_location[0] == '/') { ap_no2slash(test_location); } --Boundary_(ID_icGaszWuI3jrth+gs6TTIw) Content-type: text/plain; name=location_walk_strdup_patch Content-transfer-encoding: 7BIT Content-disposition: inline; filename=location_walk_strdup_patch Index: server/request.c =================================================================== RCS file: /home/cvspublic/httpd-2.0/server/request.c,v retrieving revision 1.14 diff -u -r1.14 request.c --- server/request.c 2001/06/27 23:18:30 1.14 +++ server/request.c 2001/07/29 17:42:45 @@ -665,11 +665,8 @@ * LocationMatch doesn't. An exception, for backwards brokenness is * absoluteURIs... in which case neither match multiple slashes. */ - if (r->uri[0] != '/') { - test_location = r->uri; - } - else { - test_location = apr_pstrdup(r->pool, r->uri); + test_location = r->uri; + if (test_location[0] == '/') { ap_no2slash(test_location); } --Boundary_(ID_icGaszWuI3jrth+gs6TTIw)--