Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getProxy returns http expire header in the past, causing forced assets re-downloads #1887

Closed
mattab opened this issue Dec 14, 2010 · 8 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Dec 14, 2010

From the demo URL:
http://demo.piwik.org/index.php?module=Proxy&action=getCss&piwik=1.1b2

Expires header is in 1981, which causes all redownload of large asset file at every request.

Response headers were:

Date: Tue, 14 Dec 2010 04:47:50 GMT
Server: Apache
X-Powered-By: PHP/5.2.4-2ubuntu5.10
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: public, must-revalidate
Vary: Accept-Encoding,User-Agent
Content-Disposition: inline; filename=asset_manager_global_css.css
Last-Modified: Tue, 14 Dec 2010 04:44:39 GMT
Content-Type: text/css
Via: 1.1 bc4
Content-Length: 12406
Connection: Keep-Alive
Content-Encoding: deflate

My requests headers were

Host: demo.piwik.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
Accept: text/css,*/*;q=0.1
Accept-Language: en-gb,fr;q=0.8,pt-br;q=0.6,fr-ca;q=0.4,en;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 3
Connection: keep-alive
Referer: http://demo.piwik.org/index.php?module=CoreHome&action=index&idSite=1&period=day&date=2010-12-14
If-Modified-Since: Tue, 14 Dec 2010 04:44:39 GMT
Cache-Control: max-age=0
@mattab
Copy link
Member Author

mattab commented Dec 14, 2010

do you see the same header in the response, which forces to re-download the assets every request?

@julienmoumne
Copy link
Member

Yes

@mattab
Copy link
Member Author

mattab commented Dec 14, 2010

Maybe the solution would be to have getAsset override the Expires header appropriately?

@robocoder
Copy link
Contributor

(In [3446]) fixes #1887 - override Expires header

@mattab
Copy link
Member Author

mattab commented Dec 14, 2010

Anthon, do you know why this issue started showing up recently and was not seen before?

@robocoder
Copy link
Contributor

In 1.0 we didn't have a proxy.

@julienmoumne
Copy link
Member

(In [3525]) adding unit test for refs #1887 comment:5

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants