httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul J. Reder" <rede...@raleigh.ibm.com>
Subject Re: [PATCH] mod_include fix
Date Fri, 17 Aug 2001 17:40:54 GMT
Jeff Trawick wrote:
> 
> In the "2.0.24 tagged" thread, Greg mentioned a problem with
> mod_include.  This fixes it for me.
> 
> We're in find_end_sequence() walking over the directive and the rest
> of the tag but we stop parsing so we don't walk over too much storage
> (e.g., mmap) at once).  When we resume later, ctx->directive_length
> has the value it had when we bailed out, so directive_length is wrong
> and we hit errors like:
> 
> [Fri Aug 17 11:12:06 2001] [error] [client 127.0.0.1] unknown directiv
> e "include virt" in parsed doc /home/trawick/apacheinst/htdocs/manual/
> mod/mod_include.html
> 
> If anyone else is hitting similar problems, please try this patch.
> 
> Index: modules/filters/mod_include.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/modules/filters/mod_include.c,v
> retrieving revision 1.121
> diff -u -r1.121 mod_include.c
> --- modules/filters/mod_include.c       2001/08/11 04:04:12     1.121
> +++ modules/filters/mod_include.c       2001/08/17 15:09:26
> @@ -270,6 +270,8 @@
>          }
>          while (c < buf + len) {
>              if (ctx->bytes_parsed >= BYTE_COUNT_THRESHOLD) {
> +                /* gonna start over parsing the directive next time through */
> +                ctx->directive_length = 0;
>                  return dptr;
>              }

Please hold on committing this. I am looking at this patch right now. This fix doesn't
seem right at first read. I'll post a go/no go in a little bit...

Thanks,

-- 
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it.  Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein

Mime
View raw message