BBlack has submitted this change and it was merged.
Change subject: zerofetch: send params in POST data on POST
......................................................................
zerofetch: send params in POST data on POST
Bug: T143285
Change-Id: Iae4bd5dfd9cb7aaddf9c2cd029f8196e12ad5be7
---
M modules/varnish/files/zerofetch.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
BBlack: Verified; Looks good to me, approved
diff --git a/modules/varnish/files/zerofetch.py
b/modules/varnish/files/zerofetch.py
index 9169185..c50a49b 100755
--- a/modules/varnish/files/zerofetch.py
+++ b/modules/varnish/files/zerofetch.py
@@ -23,7 +23,10 @@
# all the other methods (including the constructor!)
def _apiJSON(self, method, action, params={}):
params.update({'action': action})
- resp = getattr(self.sess, method)(self.baseurl, params=params)
+ if method == 'get':
+ resp = getattr(self.sess, method)(self.baseurl, params=params)
+ else:
+ resp = getattr(self.sess, method)(self.baseurl, data=params)
if resp.status_code != requests.codes.ok:
raise Exception('Bad response code ' +
str(resp.status_code) +
--
To view, visit https://gerrit.wikimedia.org/r/306305
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae4bd5dfd9cb7aaddf9c2cd029f8196e12ad5be7
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits