diff --git a/pywb/warcserver/index/indexsource.py b/pywb/warcserver/index/indexsource.py index e5e3f7bb..ced10f15 100644 --- a/pywb/warcserver/index/indexsource.py +++ b/pywb/warcserver/index/indexsource.py @@ -248,7 +248,7 @@ class XmlQueryIndexSource(BaseIndexSource): try: limit = params.get('limit') if limit: - query = 'limit: {0} '.format(limit) + query + query = 'limit:{0} '.format(limit) + query # OpenSearch API requires double-escaping # TODO: add option to not double escape if needed diff --git a/pywb/warcserver/index/test/test_xmlquery_indexsource.py b/pywb/warcserver/index/test/test_xmlquery_indexsource.py index 63f832ce..3986d11e 100644 --- a/pywb/warcserver/index/test/test_xmlquery_indexsource.py +++ b/pywb/warcserver/index/test/test_xmlquery_indexsource.py @@ -78,7 +78,7 @@ com,example)/ 20180112200243 example.warc.gz com,example)/ 20180216200300 example.warc.gz""" assert(key_ts_res(reslist) == expected) assert(errs == {}) - assert query_url == 'http://localhost:8080/path?q=limit%3A+100+type%3Aurlquery+url%3Ahttp%253A%252F%252Fexample.com%252F' + assert query_url == 'http://localhost:8080/path?q=limit%3A100+type%3Aurlquery+url%3Ahttp%253A%252F%252Fexample.com%252F' assert reslist[0]['length'] == '123' assert 'length' not in reslist[1]