httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject [PATCH] remove some more strdup calls
Date Sun, 29 Jul 2001 17:50:11 GMT
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);
     }
 


Mime
View raw message