perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_filter.c
Date Sat, 08 Feb 2003 04:36:35 GMT
stas        2003/02/07 20:36:35

  Modified:    src/modules/perl modperl_filter.c
  Log:
  use a faster way to check whether we need to use a truncated buffer,
  strlen on an 8k buffer is not cool.
  
  Revision  Changes    Path
  1.52      +2 -1      modperl-2.0/src/modules/perl/modperl_filter.c
  
  Index: modperl_filter.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- modperl_filter.c	7 Feb 2003 02:49:01 -0000	1.51
  +++ modperl_filter.c	8 Feb 2003 04:36:35 -0000	1.52
  @@ -25,7 +25,8 @@
            * XXX: if buf wasn't 'const char *buf' we could simply do
            * buf[len] = '\0'
            */
  -        if (len < strlen(buf)) {
  +        /* MP_IOBUFSIZE is the size of wb->outbuf */
  +        if (buf == wb->outbuf && len < MP_IOBUFSIZE) {
               work_buf = (char *)apr_pcalloc(wb->pool, sizeof(char*)*len);
               memcpy((void*)work_buf, buf, len);
           }
  
  
  

Mime
View raw message