stas        2003/11/22 02:21:54

  Modified:    src/modules/perl modperl_filter.c
  Log:
  modperl_wbucket_pass() wasn't always followed by the code to reset wbucket
  counter. move it inside that function, to fix the current bug and avoid
  future problems
  
  Revision  Changes    Path
  1.74      +6 -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.73
  retrieving revision 1.74
  diff -u -u -r1.73 -r1.74
  --- modperl_filter.c  16 Nov 2003 03:32:21 -0000      1.73
  +++ modperl_filter.c  22 Nov 2003 10:21:53 -0000      1.74
  @@ -95,6 +95,12 @@
       apr_bucket *bucket;
       const char *work_buf = buf;
   
  +    /* reset the counter to 0 as early as possible and in one place,
  +     * since this function will always either path the data out (and
  +     * it has 'len' already) or return an error.
  +     */
  +     wb->outcnt = 0;
  +
       if (wb->header_parse) {
           request_rec *r = wb->r;
           const char *bodytext = NULL;
  @@ -181,7 +187,6 @@
       if (wb->outcnt) {
           rv = modperl_wbucket_pass(wb, wb->outbuf, wb->outcnt,
                                     add_flush_bucket);
  -        wb->outcnt = 0;
       }
       else if (add_flush_bucket) {
           rv = send_output_flush(*(wb->filters));
  
  
  

Reply via email to