From cb3d1196f2d962b996eeb0145ba3a615b9caa96f Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Wed, 27 Feb 2019 17:49:02 +0000 Subject: [PATCH] Use space and let quote_plus encode to plus (and avoid it becoming %2B). For ukwa/ukwa-pywb#29. --- pywb/warcserver/index/indexsource.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywb/warcserver/index/indexsource.py b/pywb/warcserver/index/indexsource.py index 2bfea26b..8305f3cc 100644 --- a/pywb/warcserver/index/indexsource.py +++ b/pywb/warcserver/index/indexsource.py @@ -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))