[aur-general] New AUR Metadata Archives

Dmitry Marakasov amdmi3 at amdmi3.ru
Thu Nov 11 21:16:21 UTC 2021


* Kevin Morris via aur-general (aur-general at lists.archlinux.org) wrote:

> The files are downloadable in gzip format; when you receive
> the file, you'll need to uncompress it.

There might in fact be an issue here, as I've ran into it. The file
might be unexpectedly returned uncompressed by some clients, for
instance python requests:

% python3 -c 'import requests; print(requests.get("https://aur.archlinux.org/packages-meta-ext-v1.json.gz").content[:50])'
b'[\n{"ID":208446,"Name":"bubblemon","PackageBaseID":'

If I'm not mistaken it's caused by excessive `content-encoding: gzip`
header:

% curl -I https://aur.archlinux.org/packages-meta-ext-v1.json.gz
HTTP/2 200
server: nginx
date: Thu, 11 Nov 2021 21:05:03 GMT
content-type: application/gzip
content-length: 7410251
last-modified: Thu, 11 Nov 2021 21:05:03 GMT
etag: "618d857f-71124b"
expires: Thu, 11 Nov 2021 21:10:03 GMT
cache-control: max-age=300
content-encoding: gzip
accept-ranges: bytes

which basically says that the transferred gzip file is additionally
encoded with gzip (e.g. doubly compressed, which is probably not
the case), so client uncompresses it upon retrieval, in fact
uncompressing the original gzip and returning plain json.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3 at amdmi3.ru  ..:     https://github.com/AMDmi3  https://amdmi3.ru



More information about the aur-general mailing list