httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: providing content-length
Date Mon, 30 Oct 2000 16:13:35 GMT
rbb@covalent.net writes:

> This looks too complex.  We only really want to calculate the content
> length if we have the entire response when we get to this filter.  The
> filter should be as simple as:
> 
> if (AP_BUCKET_IS_EOS(AP_BUCKET_LAST(bb)) {
> 
>     /* Make sure we soak up all pipe/socket data. */
>     AP_BUCKET_FOREACH(e,bb) {
>         ap_bucket_read(e, &str, &length);
>     }
>     /* get the content length */
>     AP_BUCKET_FOREACH(e,bb) {
>         length += e->length;
>     }
>     r->content_length = length;
>     ap_pass_brigade(f->next, bb);
> }
> ap_pass_brigade(f->next, bb);

yep...

Any opinions on the big picture?  Content-length is goodness but it
can be painful...  While I think we need to be able to fix it up, I'm
still uncomfortable with always adding it in.

Roy?
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message