httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
Date Mon, 08 Jun 1998 10:42:44 GMT

In article <> you wrote:
> On 3 Jun 1998 wrote:

>> rse         98/06/03 05:12:12
>>   Modified:    src      CHANGES
>>                src/modules/standard mod_rewrite.c
>>   Log:
>>   Fix recently introduced Win32 child spawning code in mod_rewrite.c which was
>>   broken because of invalid ap_pstrcat() -> strcat() transformation.  I'm a
>>   little bit confused: Seems like no one has actually compiled Apache with all
>>   modules under Win32 just before Jim rolled the 1.3.0 tarball. Because else
>>   someone had received a compile error. Hmmm... I knew why I hates to put code
>>   into mod_rewrite I couldn't test myself... :-(

> Why is it using sprintf?

> No.  Code.  Should.  Use.  sprintf.  Almost.

> We have an ap_snprintf.  Use it.  I don't care if it isn't necessary or
> you think it isn't necessary or it may not be necessary or you hope it
> isn't necessary.  Always unless you shouldn't. And I see no reason why you
> shouldn't here. 

Its nice that you complain such loudly but the reason why I used sprintf
instead of ap_snprintf or ap_strcat is not because I'm an idiot and don't know
them. Instead it is because at this child function there is no pool available
without hacking. So I cannot use these functions directly. So, what do you
recommend instead of using a local buffer and sprintf? The permanent pool?  Or
should be pass a pool to the child manually though a structure? Then which
                                       Ralf S. Engelschall

View raw message