httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject Re: [patch] mod-include fix
Date Thu, 21 Feb 2002 05:19:04 GMT
Ian Holsman wrote:

> can other people please sanity check this patch
> the case it is trying to fix is the case where the end of a bucket has 
> the start of a SSI tag .. 'ie a <' and the next bucket is found not to
> match the SSI tag.. '/table>' for example.
> this sends the '<' out.
>
> Index: mod_include.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
> retrieving revision 1.188
> diff -u -r1.188 mod_include.c
> --- mod_include.c       21 Jan 2002 01:43:30 -0000      1.188
> +++ mod_include.c       21 Feb 2002 04:01:18 -0000
> @@ -429,7 +429,18 @@
>                  return found_start_sequence(dptr, ctx, c - buf);
>              }
>
> -            /* False alarm... */
> +            /* False alarm...
> +             * send out the unmatched part
> +             */
> +            if (ctx->parse_pos >0) {
> +                apr_bucket *tmp_buck;
> +                tmp_buck = 
> apr_bucket_pool_create(apr_pstrndup(ctx->pool,
> + ctx->start_seq,
> + ctx->parse_pos),
> +                                                  ctx->parse_pos,
> +                                                  ctx->pool); 


Do we need to reset ctx->parse_pos here?

Other than that question, the patch looks good to me
--Brian



>
> +                APR_BUCKET_INSERT_BEFORE(dptr, tmp_buck);
> +            }
>              ctx->state = PRE_HEAD;
>          }
>
>




Mime
View raw message