httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony J. Biacco" <abia...@formatdynamics.com>
Subject RE: mod_deflate feature needed
Date Thu, 16 Jul 2009 17:43:55 GMT
> 
> It's more efficient.  A stat syscall can get you the file-size of a
> local file before attempting to do anything else.  You can't do the
> equivalent with an unknown request that gets streamed in from a
backend
> server.  You could check, but I think the content-length indicates the
> uncompressed content even then.

But the request isn't unknown, it has the uncompressed content length
associated with it in the header I'm providing, just like the stat call
is providing for the static file.
It's a single stat() call vs. a single apr_table_get() call to get the
number.
Now if tomcat isn't sending the content-length, I can totally
understand.

> 
> Wouldn't an easier solution to your problem be to just disable deflate
> and/or HTTP 1.1 when talking to your problematic CDN?  It's only one
> transfer per network, right?
> 
> 

If I don't send a gzip header (content-encoding) onto the CDN from my
origin servers, then they don't send it on to the end-user, which means
none of my data would get compressed.
I tried downgrading the connection to HTTP 1.0. That doesn't send the
content-length for me either.

-Tony



> 
> Thanks,
> 
> Rick Houser
> Auto-Owners Insurance
> Systems Support
> (517)703-2580
> 
> -----Original Message-----
> From: Anthony J. Biacco [mailto:abiacco@formatdynamics.com]
> Sent: Thursday, July 16, 2009 1:16 PM
> To: modules-dev@httpd.apache.org
> Subject: RE: mod_deflate feature needed
> 
> Yep, that's what I said, should. It doesn't require it and I
understand
> why I's chunking and streaming it for speed of sending. But why should
> it send the content-length out properly for static files and not use
> chunked encoding, and fail to do the same for my tomcat content and
use
> chunked encoding (especially when I'm not setting chunked encoding to
> start with on the data)? That's not consistent.
> 
> -Tony
> ---------------------------
> Manager, IT Operations
> Format Dynamics, Inc.
> 303-573-1800x27
> abiacco@formatdynamics.com
> http://www.formatdynamics.com
> 
> 
> > -----Original Message-----
> > From: Tom Evans [mailto:tevans.uk@googlemail.com]
> > Sent: Thursday, July 16, 2009 10:52 AM
> > To: modules-dev@httpd.apache.org
> > Subject: RE: mod_deflate feature needed
> >
> > On Thu, 2009-07-16 at 10:20 -0600, Anthony J. Biacco wrote:
> > > We're not violating the specs, we're following them. The HTTP spec
> > > states that you should send out a content-length header with the
> > correct
> > > trasnfer length, and mod_deflate in this case is not doing that.
> > >
> > > -Tony
> >
> > No it doesn't; it says that 'Applications SHOULD use this field to
> > indicate the transfer-length of the message-body, unless this is
> > prohibited by the rules in section 4.4'
> >
> > Rule 2 of section 4.4 clearly indicates that you must not set it if
> you
> > are transferring data using the chunked transfer encoding (in fact,
> any
> > transfer encoding other than 'identity').
> >
> > It is sub optimal in most use cases to buffer the entire response
and
> > gzip encode it, so mod_deflate does the sane thing and so transfers
> it
> 
> > in chunks.
> >
> > Cheers
> >
> > Tom
> 
> 


Mime
View raw message