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

xmlquery: remove space after the "limit:" query field name (#640)

OutbackCDX can't handle a space here as it decodes fields by splitting
on space.
This commit is contained in:
Alex Osborne 2021-05-13 10:33:58 +09:00 committed by GitHub
parent abb76911f5
commit 551b8fe026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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]