From 35c73570eb7a900b4cb9a2ba20c5092f9bac1a94 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Tue, 21 Jul 2020 10:07:02 +0200 Subject: [PATCH] Remove [ and ] around parameter values in http url Without this patch, using a publisher like - http://host.com/?a=b&c=d leads to calling a http post to http://host.com/?a=['b']&c=['d'] URLs without additional parameters are not affected. Change-Id: I7c4f03b5d4412ec2844cb24d32ce575442c9fd3c (cherry picked from commit 4c859ad4dfe7a704fc596c041de5b67db7b065ce) (cherry picked from commit af90111c142ba171fe0b8ce497414687a6a3bd58) --- ceilometer/publisher/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceilometer/publisher/http.py b/ceilometer/publisher/http.py index 6fe88ab9fd..46734cdab1 100644 --- a/ceilometer/publisher/http.py +++ b/ceilometer/publisher/http.py @@ -139,7 +139,7 @@ class HttpPublisher(publisher.ConfigPublisherBase): scheme, netloc, parsed_url.path, - urlparse.urlencode(params), + urlparse.urlencode(params, doseq=True), parsed_url.fragment]) self.session.mount(self.target, adapters.HTTPAdapter(**kwargs))