]> git.ipfire.org Git - location/libloc.git/commit
importer: Fix parsing gzipped content on invalid Content-Type header
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Dec 2022 11:06:01 +0000 (11:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Dec 2022 11:06:01 +0000 (11:06 +0000)
commitc39b3b92b0c557fba49a01ec63879189f3db2da1
tree35bc3cbe5a4dbe98e6be1890ae81544cd102c95f
parent8c6d516db75c02e1b4ad293b63a0e03b961f4a55
importer: Fix parsing gzipped content on invalid Content-Type header

RIPE seems to have misconfigured their webserver which now sends
application/octet-stream for all gzipped files instead of
application/x-gzip or similar which is what the importer would expect.

Instead of only checking the content type, we will now test whether we
see the gzip magic and try to decompress the file then.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location/importer.py