GWicke has uploaded a new change for review.

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

Change subject: Don't normalize the path for requests to restbase
......................................................................

Don't normalize the path for requests to restbase

RESTBase uses a path-based layout, in which path components can contain
special characters including slashes. The normalize_path method decodes those,
which breaks requests to RESTBase where components contain %2f.

This patch addresses this issue by disabling the call to normalize_path for
requests matching ^/api/rest_v1/.

Change-Id: I4c5a85f565e8d354a95bdc0f01ef65fc88cb3999
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/206345/1

diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index 689ec15..6eb6703 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -90,7 +90,11 @@
        unset req.http.Range;
 
        call rewrite_proxy_urls;
-       call normalize_path;
+       
+       if (req.url !~ "^/api/rest_v1/") {
+               call normalize_path;
+       }
+
        call mobile_redirect;
 
        if (req.http.host ~ "^test\.") {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c5a85f565e8d354a95bdc0f01ef65fc88cb3999
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke <gwi...@wikimedia.org>

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

Reply via email to