Changes between Initial Version and Version 7 of Ticket #11813

09/18/11 18:02:49 (9 years ago)

Replying to leif:

But the purpose of ~/.wgetrc in this case would be to always disable caching (by default), such that it wouldn't matter whether you're behind a proxy or not (provided the proxy isn't broken and doesn't refuse to bypass caching).

So you are suggesting that every Sage developer puts a particular entry in ~/.wgetrc on all of his laptops, just to be safe if he ever leaves his house with it. While we could just work around it in a few lines of the apache httpd.conf.

Well, humans are more likely to read the comments on a ticket, so they actually see that a patch was re-uploaded / modified (though they perhaps don't look at the file modification times of the downloaded files, which one IMHO should do).

The html version does not get erroneously cached, the bug manifests only with the raw attachment. Trac dishes out the html version with Cache-control: must-revalidate:

vbraun@boxen:~$ wget -O- -S | md5sum--10:49:49--
           => `-'
Connecting to||:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 Ok
  Date: Sun, 18 Sep 2011 17:49:49 GMT
  Server: Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.5.1 mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_wsgi/2.0
  ETag: W/"anonymous/Sat, 17 Sep 2011 21:06:12 GMT/False"
  Cache-control: must-revalidate
  Set-Cookie: trac_form_token=6ee2168bc6a1bd4e46d5ac03; Path=/sage_trac
  Set-Cookie: trac_session=36b6b4eaaf22a880e1451a6a; expires=Sat, 17-Dec-2011 17:49:53 GMT; Path=/sage_trac
  Content-Length: 750922
  Vary: Accept-Encoding
  Keep-Alive: timeout=15, max=1000
  Connection: Keep-Alive
  Content-Type: text/html;charset=utf-8
Length: 750,922 (733K) [text/html]

100%[===========================================================================================================================>] 750,922       --.--K/s             

10:49:53 (181.60 MB/s) - `-' saved [750922/750922]

0ee8396915e5be21797f03b88cacd53c  -

Though the Vary: Accept-Encoding header is very wrong. Looking at the trac trac (:-), this seems to be a known bug: That ticket says: "Also note that Request.send_file() function does not send a Cache-Control header. That should be OK if Vary * is sent". This seems to be the issue, raw attachments neither have a Cache-control nor a Vary: * header. And I don't check manually that a downloaded file has the right time stamp, I have a computer to do menial task for me not the other way round :-)