Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Dev

Vary and gzip

 

 

Varnish dev RSS feed   Index | Next | Previous | View Threaded


apj at mutt

Jul 19, 2012, 1:50 PM

Post #1 of 2 (356 views)
Permalink
Vary and gzip

While trying to reproduce #1172, I've realized what a mess Vary and gzip really
is.

In the concrete case, presented in #1172, I believe the reporter is wrong that
his backend is correct, it doesn't seem to send Vary: Accept-Encoding for
non-gzip requests.

However, I've used varnish for compressing uncached content coming from an IIS
server.
In this case, the IIS will never compress, and therefore doesn't send "Vary:
Accept-Encoding". But I set beresp.do_gzip, and would expect to see a proper
Vary for the response.

Which cases would it be reasonable to expect varnish to make sure that a proper
Vary: Accept-Encoding is sent?

My expections are:
* When the backend does support gzip and sends proper Vary, the client should
get Vary: Accept-Encoding for both gzip and non-gzip reqs. This works today.

* When the backend does support gzip, but doesn't send Vary on non-gzip
requests. Varnish should fix the Vary header as part of the gzip support.
I don't believe this works today.

* When the backend doesn't support gzip, but beresp.do_gzip is set, varnish
should add the proper Vary as part of the gzip support.
This doesn't work today.

Am I being unreasonable in my expectations? Are there scenarios I haven't
covered?

--
Andreas

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


apj at mutt

Jul 19, 2012, 3:44 PM

Post #2 of 2 (348 views)
Permalink
Re: Vary and gzip [In reply to]

On Thu, Jul 19, 2012 at 10:50:13PM +0200, Andreas Plesner Jacobsen wrote:
>
> * When the backend does support gzip, but doesn't send Vary on non-gzip
> requests. Varnish should fix the Vary header as part of the gzip support.
> I don't believe this works today.

This is wrong. This would work for cached content, because varnish would fetch
from the backend with A-E: gzip, but it would be broken for passes, and there's
no way we can detect a mis-behaving backend, so that should be fixed in the
backend or in VCL.

--
Andreas

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Varnish dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.