On Sun, 29 Jul 2001, Brian Pane wrote:
> Here's another small performance patch to remove calls
> to apr_pstrdup, this time in location_walk.
>
erm... doesn't this change mean that we are mucking with r->uri directly
by calling ap_no2slash() on it? Isn't that a problem and the whole point
behind the strdup? r->uri should remain the original one, not the one
with whatever fixups we use for whatever reason...
> --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);
> }
>
>
>