https://bugzilla.wikimedia.org/show_bug.cgi?id=4947





--- Comment #15 from Brion Vibber <[email protected]>  2008-12-16 20:05:54 
UTC ---
SVGZ is pretty ugly to handle because it doesn't have its own Content-Type...
the server is supposed to serve them out with Content-Type: image/svg+xml *and*
Content-Encoding: gzip... which has the added confusion that the user-agent
would transparently decompress it... and if you save it to disk you'll get the
decompressed version.

So, even if everything's working right on the server end, when you download you
may not get back the same file you uploaded. Potentially now you've got an
".svgz" file on disk which is actually not compressed... Eww!

As a trivial test, I gzipped an SVG file and uploaded it to my web server,
running Apache 2 on Ubuntu 8.10:

http://leuksman.com/misc/test2.svgz

With a stock Apache configuration, it's served out as image/svg+xml *without*
the encoding setting. Firefox 3.0.3 interprets it as raw SVG, which of course
is invalid XML (being a big binary blob) and doesn't render it.

After adding the Apache config bits above to add the Content-Encoding header, I
find that Firefox renders it now. (Yay!) But, if I save the file to disk, it
saves the *compressed* version with a ".svgz.svg" extension, which now fails to
load since it's marked as uncompressed but is in fact compressed.

Safari 3.2.1 and Opera 9.5 render the image fine inline, but when saving to
disk give me an *uncompressed* version with ".svgz" extension.

So... I think things are not quite mature enough here. :(


IMHO the cleanest way to go would be to transparently decompress .svgz files on
upload, normalize everything to .svg, and have the web server transparently
gzip .svg files when serving out, if we like, to save bandwidth. (Most of the
time we don't even serve the .svg out -- we serve a .png rasterization -- so
this wouldn't be a heavy burden.)


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to