John Darrington <[email protected]> skribis: > and if I try to manually download > https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import > > I get a zero length file. :(
Indeed: --8<---------------cut here---------------start------------->8--- $ wget -q -O - https://mirror.hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import |wc -c 0 $ wget -q -O - https://hydra.gnu.org/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import |wc -c 0 --8<---------------cut here---------------end--------------->8--- So the problem is that nginx on hydra.gnu.org cached a zero-length file, and then nginx on mirror.hydra.gnu.org cached that too. On hydra.gnu.org, we have: --8<---------------cut here---------------start------------->8--- /var/cache/nginx/nar# cat 09/87d4a93959df3b0c82baed615b578109 X��������:kX`�� KEY: http://127.0.0.1:3000/nar/ciqw5z470c8ihl1kfswj1j3ix6hs092d-module-import HTTP/1.1 200 OK Content-Type: application/x-nix-archive Set-Cookie: hydra_session=437ad1277e047114d0a49212805fd1867c0cf914; path=/; expires=Tue, 10-Jan-2017 05:43:20 GMT; HttpOnly Transfer-Encoding: chunked Date: Tue, 03 Jan 2017 05:43:43 GMT Connection: close --8<---------------cut here---------------end--------------->8--- Hydra (the software) produces HTTP chunked-encoded nars, as can be seen above. Rereading <https://tools.ietf.org/html/rfc2616#section-3.6.1>, it seems that HTTP clients can detect truncated chunks, but they cannot detect missing chunks since the total number of chunks is unknown and the trailer is optional. Presumably, what happened is that hydra.gnu.org was loaded and Hydra dropped the connection, and then nginx cached what it got (i.e., nothing.) Seems like the only way to fix it is by using ‘Content-Length’. At the very least, we should do that in ‘guix publish’. For now, I’ve removed the faulty cached item from the nginx cache on both machines. Thanks, Ludo’.
