Hi,first of all, a shout out to all ZuriHac2014 folks, thanks for the gentle introduction to the deeper trenches of Haskell infrastructure!I spent a bit of time looking into why "cabal update" always redownloads the entire package list even though the code has explicit support for etags, and it looks like etags are broken on the server side. The server does serve "Etag" headers, but does not react to If-None-Match:$ curl -I --header 'If-None-Match: "1ea6c9a3168b9c186d5bbafd065ce5ec"' hackage.haskell.org/packages/index.tar.gzHTTP/1.1 200 OKServer: nginx/1.6.0Date: Mon, 09 Jun 2014 23:22:49 GMTContent-Type: application/x-gzipContent-Length: 7193838Connection: keep-aliveContent-MD5: 1ea6c9a3168b9c186d5bbafd065ce5ecETag: "1ea6c9a3168b9c186d5bbafd065ce5ec"Last-modified: Mon, 09 Jun 2014 23:10:44 GMTIn this case the server is supposed to return a 304 code because the ETag matches, but it returns the usual 200.
Here's a well-behaved server for comparison:$ curl -I --header 'If-None-Match: f89ef04efbcb1bbd413c9170523beeb1' http://upload.wikimedia.org/HTTP/1.1 304 Not ModifiedLast-Modified: Thu, 03 Oct 2013 22:29:34 GMTEtag: f89ef04efbcb1bbd413c9170523beeb1X-Timestamp: 1380839374.33426X-Object-Meta-Mtime: 1366745378.0Content-Type: text/htmlX-Varnish: 2552484147 2541352860, 2937266545 2853346814, 523731362Via: 1.1 varnish, 1.1 varnish, 1.1 varnishAccept-Ranges: bytesDate: Mon, 09 Jun 2014 23:29:36 GMTAge: 38954Connection: keep-aliveX-Cache: cp1064 hit (336), cp3010 hit (1791), cp3007 frontend miss (0)Access-Control-Allow-Origin: *Access-Control-Expose-Headers: Age, Content-Length, Date, X-Cache, X-VarnishNote the 304 return code.I do not know about the configuration in use on the server, but something seems to be wrong there. There are some nginx bug reports [1] about similar issues, not sure if they are relevant here.Best regards,--
Gintautas Miliauskas
_______________________________________________
cabal-devel mailing list
cabal-devel@haskell.org
http://www.haskell.org/mailman/listinfo/cabal-devel