Opened 13 years ago

Last modified 7 years ago

#2044 new defect

make sage -upgrade work with caching proxy servers

Reported by: mabshoff Owned by: mabshoff
Priority: major Milestone: sage-6.4
Component: website/wiki Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In http://groups.google.com/group/sage-devel/t/e88f02da4c345cb7 Phil reports the following problem:

Hello,

I had many troubles getting the upgrade through a caching proxy on
which I've no control.
When running sage -upgrade, the proxy didn't let me getting the latest
versions, which made troubles with the critical files:
http://www.sagemath.org/packages/standard/list
http://www.sagemath.org/packages/standard/deps
http://www.sagemath.org/packages/standard/newest_version
http://www.sagemath.org/packages/standard/README
http://www.sagemath.org/packages/install

I could get around by providing manually the files and skipping the
download in local/bin/sage-update

But would it be possible to add some anti-caching headers to the
official sage server for those files?
It'd help a lot all people like me with a sage install behind caching
proxy.
Sth like:
 Expires: Mon, 26 Jul 1997 05:00:00 GMT"
 Cache-Control: no-store, no-cache, must-revalidate"
 Cache-Control: post-check=0, pre-check=0", false
 Pragma: no-cache

Phil 

Change History (6)

comment:1 Changed 13 years ago by mabshoff

Some more info from Phil:

Apparently your server is an Apache so after googling myself I found
those pages:
http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-cachin...
http://httpd.apache.org/docs/2.0/mod/mod_expires.html
http://httpd.apache.org/docs/2.0/mod/mod_headers.html#header
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

So I guess having a .htaccess in packages/ with sth like that is good
enough
(be sure to have modules expire and headers and to allow .htaccess
files)
<FilesMatch "(list|deps|newest_version|README)$">
<IfModule mod_expires.c>
  # any Expires Directives go here
  ExpiresActive On
  ExpiresDefault access
</IfModule>
<IfModule mod_headers.c>
  # any Header directives go here
  Header set Cache-Control "no-store, no-cache, must-revalidate, max-
age=0"
  Header set Pragma "no-cache"
</IfModule>
</FilesMatch>

And same for ../install

To be tested with sth like:
 wget -O /dev/null -S http://www.sagemath.org/packages/standard/list
to see the headers returned by the Apache server 

Cheers,

Michael

comment:2 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 7 years ago by jdemeyer

  • Component changed from distribution to website/wiki
  • Report Upstream set to N/A

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.