Ema has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310767

Change subject: cache_upload fe: do not set do_stream=true on Varnish 4
......................................................................

cache_upload fe: do not set do_stream=true on Varnish 4

Just like b3158f8a455757f36445a349267b7e31ad5ce203, but on the frontend.

Bug: T144257
Bug: T131502
Change-Id: If1599421a64259511f8fb38fb61597808fdf5320
---
M templates/varnish/upload-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/310767/1

diff --git a/templates/varnish/upload-frontend.inc.vcl.erb 
b/templates/varnish/upload-frontend.inc.vcl.erb
index 4dcc6de..2ced015 100644
--- a/templates/varnish/upload-frontend.inc.vcl.erb
+++ b/templates/varnish/upload-frontend.inc.vcl.erb
@@ -62,16 +62,20 @@
                // a passed range request
                set beresp.http.X-Content-Range = beresp.http.Content-Range;
 
+               <%- if not @varnish_version4 -%>
                if (beresp.http.Content-Range ~ "\/[0-9]{8,}$") {
                        set beresp.do_stream = true;
                }
+               <%- end -%>
        }
 
+       <%- if not @varnish_version4 -%>
        // Stream large objects, >= 1 or 32 MB
 <% stream_threshold = @cache_route == 'direct' ? 33554432 : 1048576 -%>
        if (std.integer(beresp.http.Content-Length, 33554432) >= <%= 
stream_threshold %> || beresp.http.Content-Length ~ "^[0-9]{9}") {
                set beresp.do_stream = true;
        }
+       <%- end -%>
 
        // hit-for-pass objects >= 1MB size
        if (std.integer(beresp.http.Content-Length, 1048576) >= 1048576 || 
beresp.http.Content-Length ~ "^[0-9]{9}") {

-- 
To view, visit https://gerrit.wikimedia.org/r/310767
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1599421a64259511f8fb38fb61597808fdf5320
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <e...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to