hholzgra / ocitysmap

Fork of ocitysmap repository at savannah.nongnu.org
Other
36 stars 13 forks source link

Downloading SVGZ results in error #36

Closed vitrinekast closed 2 years ago

vitrinekast commented 2 years ago

When downloading a map in SVGZ, in my case https://print.get-map.org/maps/208909, I get the following error:

This page contains the following errors:
error on line 1 at column 1: Encoding error
Below is a rendering of the page up to the first error.
hholzgra commented 2 years ago

The file is delivered correctly as gzip compressed SVG, but the content header is generated as

Content-Type: image/svg+xml

but seems to be missing

Content-Encoding: gzip

so browsers that try to display the SVG directly stumble ... it is still possible to do "Save as ..." to save the received file.

Need to play with this a bit to see if adding gzip content encoding is sufficient, or may lead to other problems ...

hholzgra commented 2 years ago

See also https://github.com/w3c/svgwg/issues/701

hholzgra commented 2 years ago

Fixed by https://github.com/hholzgra/maposmatic/commit/1520059c7d6cf4c0dd62a8019cfcd16e330a8732