You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Havard <br...@kheldar.apana.org.au> on 2001/04/21 06:46:55 UTC

Re: cvs commit: httpd-2.0/modules/filters mod_include.c

On 20 Apr 2001 20:58:29 -0000, jwoolley@apache.org wrote:

>jwoolley    01/04/20 13:58:28
>
>  Modified:    modules/filters mod_include.c
>  Log:
>  Change mod_include to use the latest bucket API tricks.  This gets
>  rid of some obscure while loop magic that had to be done before,
>  making mod_include easier to read and a better example for future
>  filter writers.
>  
>  There should be no semantic changes in this patch... just a 1-to-1
>  mapping from while loops to bucket API calls that do the same thing.
>  
>  Reviewed by:	Paul J. Reder
>  
>  Revision  Changes    Path
>  1.108     +19 -47    httpd-2.0/modules/filters/mod_include.c
>  
>  Index: mod_include.c
>  ===================================================================
>  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
>  retrieving revision 1.107
>  retrieving revision 1.108
>  diff -u -d -u -r1.107 -r1.108
>  --- mod_include.c	2001/04/10 16:57:27	1.107
>  +++ mod_include.c	2001/04/20 20:58:28	1.108
>                   }
>                   else {
>  -                    do {
>  -                        tmp_bkt  = tmp_dptr;
>  -                        tmp_dptr = APR_BUCKET_NEXT (tmp_dptr);
>  -                        apr_bucket_delete(tmp_bkt);
>  -                    } while ((tmp_dptr != dptr) &&
>  -                             (tmp_dptr != APR_BRIGADE_SENTINEL(*bb)));
>  +                    apr_bucket_brigade *temp_bb = *bb;
>  +                    *bb = apr_brigade_split(temp_bb, dptr);
>  +                    apr_brigade_destroy(temp_bb);
>                   }
>   
>                   return;

This part doesn't appear to be equivalent, I'm seeing data before a tag
getting lost.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Re: cvs commit: httpd-2.0/modules/filters mod_include.c

Posted by Cliff Woolley <cl...@yahoo.com>.
On Sat, 21 Apr 2001, Brian Havard wrote:

> >                   }
> >                   else {
> >  -                    do {
> >  -                        tmp_bkt  = tmp_dptr;
> >  -                        tmp_dptr = APR_BUCKET_NEXT (tmp_dptr);
> >  -                        apr_bucket_delete(tmp_bkt);
> >  -                    } while ((tmp_dptr != dptr) &&
> >  -                             (tmp_dptr != APR_BRIGADE_SENTINEL(*bb)));
> >  +                    apr_bucket_brigade *temp_bb = *bb;
> >  +                    *bb = apr_brigade_split(temp_bb, dptr);
> >  +                    apr_brigade_destroy(temp_bb);
> >                   }
> >
> >                   return;
>
> This part doesn't appear to be equivalent, I'm seeing data before a tag
> getting lost.

Hmmm... yeah, my fault.  I see the problem.  Will patch ASAP.

--Cliff



--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA