httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plüm, Rüdiger, VF-Group" <ruediger.pl...@vodafone.com>
Subject RE: svn commit: r1162579 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Date Mon, 29 Aug 2011 08:40:34 GMT
 

> -----Original Message-----
> From: Stefan Fritsch [mailto:sf@sfritsch.de] 
> Sent: Sonntag, 28. August 2011 23:36
> To: dev@httpd.apache.org
> Subject: Re: svn commit: r1162579 - 
> /httpd/httpd/trunk/modules/http/byterange_filter.c
> 
> On Sun, 28 Aug 2011, sf@apache.org wrote:
> 
> > Author: sf
> > Date: Sun Aug 28 19:45:21 2011
> > New Revision: 1162579
> >
> > URL: http://svn.apache.org/viewvc?rev=1162579&view=rev
> > Log:
> > Every 32 ranges, pass the prepared ranges down the filter chain.
> >
> > Modified:
> >    httpd/httpd/trunk/modules/http/byterange_filter.c
> >
> > Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
> > URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/by
> terange_filter.c?rev=1162579&r1=1162578&r2=1162579&view=diff
> > 
> ==============================================================
> ================
> > --- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
> > +++ httpd/httpd/trunk/modules/http/byterange_filter.c Sun 
> Aug 28 19:45:21 2011
> > @@ -378,6 +378,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
> >         }
> >
> >         APR_BRIGADE_CONCAT(bsend, tmpbb);
> > +        if (i && i % 32 == 0) {
> > +            /* Every now and then, pass what we have down 
> the filter chain */
> > +            if ((rv = ap_pass_brigade(f->next, bsend)) != 
> APR_SUCCESS)
> > +                return rv;
> > +            apr_brigade_cleanup(bsend);
> > +        }
> >     }
> 
> This is broken. It causes the Content-Length header to 
> contain the size of 
> the original file instead of the response body. Is the 
> correct fix to add
> apr_table_unset(r->headers_out, "Content-Length") ?

This looks correct. Maybe to be extra save we should also set r->clength to
0 as well.

Regards

Rüdiger

Mime
View raw message