You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2001/07/23 01:00:52 UTC

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

rbb         01/07/22 16:00:52

  Modified:    .        CHANGES
               modules/filters mod_include.c
  Log:
  Fix a cosmetic problem with mod_include.  Non-existant SSI vars
  used to appear as '(none', without the closing paren.
  Submitted by:	G�nter Knauf <ef...@gmx.net>
  
  Revision  Changes    Path
  1.254     +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.253
  retrieving revision 1.254
  diff -u -r1.253 -r1.254
  --- CHANGES	2001/07/21 06:34:54	1.253
  +++ CHANGES	2001/07/22 23:00:52	1.254
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0.22-dev
   
  +  *) Fix a cosmetic problem with mod_include.  Non-existant SSI vars
  +     used to appear as '(none', without the closing paren.
  +     [G�nter Knauf <ef...@gmx.net>]
  +
     *) Improve the exports generating awk script.  In the past, we had
        work around problems in the awk script by avoiding some #if and
        #ifdefs.  This has bitten us many times in generating the exports.c
  
  
  
  1.112     +1 -1      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.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- mod_include.c	2001/06/13 13:44:36	1.111
  +++ mod_include.c	2001/07/22 23:00:52	1.112
  @@ -914,7 +914,7 @@
                       tmp_buck = apr_bucket_heap_create(echo_text, e_len, 1, &e_wrt);
                   }
                   else {
  -                    tmp_buck = apr_bucket_immortal_create("(none)", sizeof("none"));
  +                    tmp_buck = apr_bucket_immortal_create("(none)", sizeof("(none)"));
                   }
                   APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
                   if (*inserted_head == NULL) {
  
  
  

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

Posted by Cliff Woolley <cl...@yahoo.com>.
On Mon, 23 Jul 2001, Ryan Bloom wrote:

> On Sunday 22 July 2001 19:14, William A. Rowe, Jr. wrote:
> > > rbb         01/07/22 16:00:52
> > >
> > >   Index: mod_include.c
> > >   ===================================================================
> > >   RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
> > >   retrieving revision 1.111
> > >   retrieving revision 1.112
> > >   diff -u -r1.111 -r1.112
> > >   --- mod_include.c 2001/06/13 13:44:36 1.111
> > >   +++ mod_include.c 2001/07/22 23:00:52 1.112
> > >   @@ -914,7 +914,7 @@
> > >                        tmp_buck = apr_bucket_heap_create(echo_text,
> > > e_len, 1, &e_wrt); }
> > >                    else {
> > >   -                    tmp_buck = apr_bucket_immortal_create("(none)",
> > > sizeof("none")); +                    tmp_buck =
> > > apr_bucket_immortal_create("(none)", sizeof("(none)"));
> >
> > Do you mean to add the trailing \0 to the bucket?
>
> It doesn't matter, the bucket code knows how to handle the trailing \0.

That's news to me.  If you pass in 7 as the length of "(none)", the
buckets code believes you and sets the bucket length to 7.  From then on,
any time you read the bucket, you'll get a null character in the middle of
your data stream, which is not correct.  Anyhow, I just committed the
subtract-one fix.

--Cliff

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



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

Posted by Ryan Bloom <rb...@covalent.net>.
On Sunday 22 July 2001 19:14, William A. Rowe, Jr. wrote:
> > rbb         01/07/22 16:00:52
> >
> >   Index: mod_include.c
> >   ===================================================================
> >   RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
> >   retrieving revision 1.111
> >   retrieving revision 1.112
> >   diff -u -r1.111 -r1.112
> >   --- mod_include.c 2001/06/13 13:44:36 1.111
> >   +++ mod_include.c 2001/07/22 23:00:52 1.112
> >   @@ -914,7 +914,7 @@
> >                        tmp_buck = apr_bucket_heap_create(echo_text,
> > e_len, 1, &e_wrt); }
> >                    else {
> >   -                    tmp_buck = apr_bucket_immortal_create("(none)",
> > sizeof("none")); +                    tmp_buck =
> > apr_bucket_immortal_create("(none)", sizeof("(none)"));
>
> Do you mean to add the trailing \0 to the bucket?

It doesn't matter, the bucket code knows how to handle the trailing \0.

Ryan
_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------

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

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> rbb         01/07/22 16:00:52
> 
>   Index: mod_include.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
>   retrieving revision 1.111
>   retrieving revision 1.112
>   diff -u -r1.111 -r1.112
>   --- mod_include.c 2001/06/13 13:44:36 1.111
>   +++ mod_include.c 2001/07/22 23:00:52 1.112
>   @@ -914,7 +914,7 @@
>                        tmp_buck = apr_bucket_heap_create(echo_text, e_len, 1, &e_wrt);
>                    }
>                    else {
>   -                    tmp_buck = apr_bucket_immortal_create("(none)", sizeof("none"));
>   +                    tmp_buck = apr_bucket_immortal_create("(none)", sizeof("(none)"));

Do you mean to add the trailing \0 to the bucket?