diff --git a/heat/engine/hot/functions.py b/heat/engine/hot/functions.py index b84dc0e53c..c4bd92c1d0 100644 --- a/heat/engine/hot/functions.py +++ b/heat/engine/hot/functions.py @@ -1430,7 +1430,7 @@ class MakeURL(function.Function): path = urlparse.quote(args.get(self.PATH, '')) query_dict = args.get(self.QUERY, {}) - query = urlparse.urlencode(query_dict) + query = urlparse.urlencode(query_dict).replace('%2F', '/') fragment = urlparse.quote(args.get(self.FRAGMENT, '')) diff --git a/heat/tests/test_hot.py b/heat/tests/test_hot.py index ec79974161..74f5a4dadb 100644 --- a/heat/tests/test_hot.py +++ b/heat/tests/test_hot.py @@ -1964,8 +1964,8 @@ conditions: 'host': 'example.com', 'path': '/foo/?bar', 'query': { - 'foo': 'bar&baz', - 'blarg': 'wib=ble', + 'foo#': 'bar & baz', + 'blarg': '/wib=ble/', }, } } @@ -1974,9 +1974,9 @@ conditions: self.assertIn(resolved, ['http://example.com/foo/%3Fbar' - '?foo=bar%26baz&blarg=wib%3Dble', + '?foo%23=bar+%26+baz&blarg=/wib%3Dble/', 'http://example.com/foo/%3Fbar' - '?blarg=wib%3Dble&foo=bar%26baz']) + '?blarg=/wib%3Dble/&foo%23=bar+%26+baz']) def test_make_url_fragment(self): snippet = {