Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/develop' into publication
Browse files Browse the repository at this point in the history
  • Loading branch information
vpelipenko committed Mar 27, 2015
2 parents 64a7430 + bee1a30 commit 11b0262
Show file tree
Hide file tree
Showing 6 changed files with 355 additions and 120 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/PageCache/etc/varnish3.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sub vcl_recv {
std.collect(req.http.Cookie);

# static files are always cacheable. remove SSL flag and cookie
if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") {
if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
unset req.http.Https;
unset req.http.Cookie;
}
Expand Down Expand Up @@ -96,7 +96,7 @@ sub vcl_fetch {
# images, css and js are cacheable by default so we have to remove cookie also
if (beresp.ttl > 0s && (req.request == "GET" || req.request == "HEAD")) {
unset beresp.http.set-cookie;
if (req.url !~ "\.(css|js|jpg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff)(\?|$)") {
if (req.url !~ "\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\?|$)") {
set beresp.http.Pragma = "no-cache";
set beresp.http.Expires = "-1";
set beresp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/PageCache/etc/varnish4.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sub vcl_recv {
std.collect(req.http.Cookie);

# static files are always cacheable. remove SSL flag and cookie
if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") {
if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
unset req.http.Https;
unset req.http.Cookie;
}
Expand Down Expand Up @@ -90,7 +90,7 @@ sub vcl_backend_response {
# images, css and js are cacheable by default so we have to remove cookie also
if (beresp.ttl > 0s && (bereq.method == "GET" || bereq.method == "HEAD")) {
unset beresp.http.set-cookie;
if (bereq.url !~ "\.(css|js|jpg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff)(\?|$)") {
if (bereq.url !~ "\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)(\?|$)") {
set beresp.http.Pragma = "no-cache";
set beresp.http.Expires = "-1";
set beresp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class HhvmCompatibilityTest extends \PHPUnit_Framework_TestCase
'mime_magic.magicfile',
'display_errors',
'default_socket_timeout',
'pcre.recursion_limit',
];

public function testAllowedIniGetSetDirectives()
Expand Down
Loading

0 comments on commit 11b0262

Please sign in to comment.