that works! you're right, it does feel hacky...

--
Harry Percival
Developer
[email protected]

PythonAnywhere - a fully browser-based Python development and hosting 
environment
<http://www.pythonanywhere.com/>

PythonAnywhere LLP
17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number OC378414.
Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK

On 07/11/14 13:59, Roberto De Ioris wrote:
Hi there uwsgi friends!

One of our users is keen on svg images, and I've been struggling to get
them served correctly.

In some cases we serve them directly from our own code, and then they
work ok if I set

      Content-Type: image/svg+xml
      Content-Encoding: gzip

But sometimes they are served using the uwsgi static files tool
(static-map).  And in that case, uwsgi recognises the mimetype
correctly, but it doesn't set the  content-encoding, and that confuses
the web browser.

Now, admittedly, I would call this a bug in the web browser, but we
can't control that easily, so is there a way to tell uwsgi's static
files handler to add a special content-encoding header to .svgz files?

Or have I misunderstood something?


route = \.svgz$ addheader:Content-Encoding: gzip

But, honestly i find it quite strange (it like telling the browser that a
tar.gz file as the gzip encoding...)


_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to