0

I have an asp.net mvc app with OutputCache enabled with varyByContentEncoding="gzip;deflate" and it seems to work fine except for one client who keeps sending GZIP as Accept-Encoding (upper case) and my cache is ignored and regenerated for his every request.

How do I fight this guy so that his requests are treated as regular gzip for cache purposes ?

RickL
  • 3,318
  • 10
  • 38
  • 39
Klotin
  • 165
  • 1
  • 12
  • Just a workaround, have you tried `varyByContentEncoding="gzip;deflate;GZIP"` – Arindam Nayak Nov 01 '14 at 07:23
  • @ArindamNayak just tried and now GZIP requests are served uncompressed. Gzipped version of the cache is not touched (which is good) but I don't think it uses uncompressed cache to serve GZIP reqs and instead goes to the controller action... – Klotin Nov 01 '14 at 14:38
  • Some more time passed and now both - GZIP and gzip requests are getting gzipped cached version. However I feel like all this OutputCache + dynamic compresion integration are not working well together. Doesn't seem too reliable. – Klotin Nov 01 '14 at 18:45

0 Answers0