I am writing an application that collects pieces of svg together and serves them as part of a page mixed with css and javascript. I am using Python and the Google App Engine. What I am doing is working fine on my local development server, but cannot deploy it.
So here is some test python to create an answer:
self.response.headers.add_header('Content-Type','application/xhtml+xml')
self.response.out.write("<html xmlns='http://www.w3.org/1999/xhtml'>")
self.response.out.write("<body>")
self.response.out.write("<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>")
self.response.out.write("<rect x='10' y='10' height='100' width='100' />")
self.response.out.write("</svg>")
self.response.out.write("</body></html>")
Now, if I ask for this on the local development server (I use Safari, but Firefox works too), it works and I see a black square. If I create an xhtml document with this markup, and I upload this page to the server, I will see the square, but when I deploy this application to the server and run it, I do not see the square. All markup is there when I look at View Source, but it will not be displayed.
mime.
: <!DOCTYPE html> < ?xml version=1.0"?>, .
?