httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject Re: rwrite() ?
Date Mon, 02 Dec 1996 01:35:11 GMT
On Sun, 1 Dec 1996, Doug MacEachern wrote:

> Perl always knows the length of it's strings, so I'm trying to find a way
> for mod_perl to use something other than rputs() and avoid the strlen()
> underneath, called before bwrite()'ing to the client.  
> At the moment, my ugly hack uses bwrite and a copy of the SET_BYTES_SENT 
> macro, which is private in http_protocol.c
> It would be ideal if a function existed such as the rwrite() below, or is 
> there is a clean way to do this already?

Well... you could use rprintf(r, "%.999s", string), where 999 is the
length of the string. That avoids a strlen, but I'm not quite sure how
practical it is. You could also just put a whole lot of rputc in a

It is a good point, though.

Alexei Kosut <>      The Apache HTTP Server

View raw message