1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

Use space and let quote_plus encode to plus (and avoid it becoming %2B). For ukwa/ukwa-pywb#29.

This commit is contained in:
Andrew Jackson 2019-02-27 17:49:02 +00:00 committed by John Berlin
parent 2a30731a0c
commit cb3d1196f2
No known key found for this signature in database
GPG Key ID: 6EF5E4B442011B02

View File

@ -235,9 +235,9 @@ class XmlQueryIndexSource(BaseIndexSource):
matchType = params.get('matchType', 'exact')
if matchType == 'exact':
query_url = self.query_api_url + '?q=' + quote_plus('type:urlquery+url:' + quote_plus(url))
query_url = self.query_api_url + '?q=' + quote_plus('type:urlquery url:' + quote_plus(url))
elif matchType == 'prefix':
query_url = self.query_api_url + '?q=' + quote_plus('type:prefixquery+url:' + quote_plus(url))
query_url = self.query_api_url + '?q=' + quote_plus('type:prefixquery url:' + quote_plus(url))
else:
raise BadRequestException('matchType={0} is not supported'.format(matchType=matchType))