Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332871 )

Change subject: Re-encode page title for mw_purge and null_edit rules.
......................................................................

Re-encode page title for mw_purge and null_edit rules.

To allow using MW-specific encoding in EventBus events
we need to re-encode the titles for mw_purge and null_edit
rules.

Depends on https://github.com/wikimedia/swagger-router/pull/53
Bug: T155066

Change-Id: Iea5051bc413001e58d0d80aecff575ae64d5123e
---
M scap/templates/config.yaml.j2
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/71/332871/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 853b0a6..be363bb 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -134,7 +134,9 @@
                     domain: /\.wikidata\.org$/
                 exec:
                   method: get
-                  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}'
+                  # This even comes directly from MediaWiki, so title is 
encoded in MW-specific way.
+                  # Re-encode the title in standard `encodeURIComponent` 
encoding.
+                  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{decode(match.meta.uri.title)}'
                   headers:
                     cache-control: no-cache
                     if-unmodified-since: '{{date(message.meta.dt)}}'
@@ -157,7 +159,9 @@
                     domain: /\.wikidata\.org$/
                 exec:
                   method: get
-                  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}'
+                  # This even comes directly from MediaWiki, so title is 
encoded in MW-specific way.
+                  # Re-encode the title in standard `encodeURIComponent` 
encoding.
+                  uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/html/{decode(match.meta.uri.title)}'
                   headers:
                     cache-control: no-cache
                     if-unmodified-since: '{{date(message.meta.dt)}}'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea5051bc413001e58d0d80aecff575ae64d5123e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <ppche...@wikimedia.org>

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

Reply via email to