You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2014/02/28 21:27:20 UTC

Re: svn commit: r1572670 - /httpd/httpd/trunk/modules/filters/mod_deflate.c


ylavic@apache.org wrote:
> Author: ylavic
> Date: Thu Feb 27 18:08:34 2014
> New Revision: 1572670
> 
> URL: http://svn.apache.org/r1572670
> Log:
> Commit 5 on 6 to fix reentrance (incomplete Zlib header or validation bytes) in mod_deflate's output and input filters.
> PR 46146 (patches from duplicated PR 55666)
> 
> Handle Zlib flags in the inflate input filter as in the output filter, using consume_zlib_flags().
> 
> Modified:
>     httpd/httpd/trunk/modules/filters/mod_deflate.c
> 
> Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=1572670&r1=1572669&r2=1572670&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
> +++ httpd/httpd/trunk/modules/filters/mod_deflate.c Thu Feb 27 18:08:34 2014

> @@ -1188,6 +1188,16 @@ static apr_status_t deflate_in_filter(ap
>              /* read */
>              apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ);
>  
> +            if (ctx->zlib_flags) {
> +                rv = consume_zlib_flags(ctx, &data, &len);
> +                if (rv == APR_SUCCESS) {
> +                    ctx->zlib_flags = 0;
> +                }
> +                if (rv == APR_INCOMPLETE || !len) {

Same as before (!len) should be enough.

Regards

RĂ¼diger


Re: svn commit: r1572670 - /httpd/httpd/trunk/modules/filters/mod_deflate.c

Posted by Yann Ylavic <yl...@gmail.com>.
On Fri, Feb 28, 2014 at 9:27 PM, Ruediger Pluem <rp...@apache.org> wrote:

>
>
> ylavic@apache.org wrote:
> > Author: ylavic
> > Date: Thu Feb 27 18:08:34 2014
> > New Revision: 1572670
> >
> > URL: http://svn.apache.org/r1572670
> > Log:
> > Commit 5 on 6 to fix reentrance (incomplete Zlib header or validation
> bytes) in mod_deflate's output and input filters.
> > PR 46146 (patches from duplicated PR 55666)
> >
> > Handle Zlib flags in the inflate input filter as in the output filter,
> using consume_zlib_flags().
> >
> > Modified:
> >     httpd/httpd/trunk/modules/filters/mod_deflate.c
> >
> > Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
> > URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=1572670&r1=1572669&r2=1572670&view=diff
> >
> ==============================================================================
> > --- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
> > +++ httpd/httpd/trunk/modules/filters/mod_deflate.c Thu Feb 27 18:08:34
> 2014
>
> > @@ -1188,6 +1188,16 @@ static apr_status_t deflate_in_filter(ap
> >              /* read */
> >              apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ);
> >
> > +            if (ctx->zlib_flags) {
> > +                rv = consume_zlib_flags(ctx, &data, &len);
> > +                if (rv == APR_SUCCESS) {
> > +                    ctx->zlib_flags = 0;
> > +                }
> > +                if (rv == APR_INCOMPLETE || !len) {
>
> Same as before (!len) should be enough.
>

Thanks, applied in r1573224.

Regards.