Merge "Don't escape /s in make_url query strings"

This commit is contained in:
Jenkins 2017-04-22 06:54:08 +00:00 committed by Gerrit Code Review
commit 6d570b70f5
2 changed files with 5 additions and 5 deletions

View File

@ -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, ''))

View File

@ -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 = {