I have a Django application and it is serving a static SVG file (I point my browser directly to something like: http://myserver.com/static/my.svg). I am using the built-in webserver that comes with Django. I have run this application from an Ubuntu server and it has worked fine. When I say "worked fine", I mean that the svg file is displayed directly on the browser window (for both Firefox and Chrome). However, when I run the same Django application on a Centos server, both Firefox and Chrome prompt the user to save/download the svg file.
On that exact same Centos server, I have tried serving the exact same svg file using Apache as the webserver and voila, the file again is displayed directly on the browser (without any prompts)!
I can only attribute the difference in behavior to the built-in webserver on Django. It is somehow sending something to the browser which makes the browser think that the file needs to be downloaded rather than rendered directly.
Is there anything special that I need to do to make this work with Django on Centos (maybe some settings)? My centos release, Django, and Python versions are shown below:
Centos Release:
LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.7 (Final)
Release: 5.7
Codename: Final
Django and Python:
(myenv)[root@foo bar]# python
Python 2.7.1 (r271:86832, Mar 17 2014, 11:59:55)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.VERSION
(1, 6, 2, 'final', 0)
Thanks