I'm writing an app that pulls chunks of svg together and serves them as part of a page mixed with css and javascript. I'm using Python and Google App Engine. What I'm doing works fine on my local development server but fails to render once it's deployed.
So here's some test python to build a response:
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 request this on the local development server (I'm using 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 that page to a server, I will see the square, but when I deploy this app on a server and run it, I don't see the square. All the markup is there when I look at View Source, but it wont render.
I've tried using different mime types.
I've tried adding: <!DOCTYPE html>
or adding <?xml version=1.0"?>
and none of it makes a difference.
Any ideas?