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); }