httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: svn commit: r1384924 - in /httpd/httpd/trunk: include/httpd.h server/request.c
Date Thu, 24 Apr 2014 14:18:34 GMT
On 24 Apr 2014, at 8:34 AM, Christophe JAILLET <> wrote:

> the comment is wrong.
> 'ap_sub_req_lookup_dirent' uses the fact that 'rnew->uri' has some extra space after
the NUL.
> 'rnew->uri' is allocated via 'ap_escape_uri' which is defined as:
>   #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
> So, what matters here is the case in 'ap_os_escape_path' where partial *is* set.
> However, I have commited r1589599 in order to update the comment and to allocate one
extra byte to be safe, even if not needed in this particular case.

Soon this will get replaced by the apr_escape API, which will allocate the precise amount
of space for each buffer. We must make sure that code is relying on side effects of the original

The apr_escape API will allow you to ask for the required amount of space, which you can then
manipulate before allocating the space, we must just be clear should we need to do this.


View raw message