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

cdx: don't warn on .loc files, zipnum: add newline to page info response

This commit is contained in:
Ilya Kreymer 2015-10-07 17:16:39 -07:00
parent a0878e6998
commit a3a8b777d2
2 changed files with 5 additions and 2 deletions

View File

@ -176,7 +176,10 @@ class CDXServer(BaseCDXServer):
if filename.endswith(('.summary', '.idx')):
return ZipNumCluster(filename, config)
logging.warn('skipping unrecognized URI:%s', filename)
# no warning for .loc
if not filename.endswith('.loc'):
logging.warn('skipping unrecognized URI: %s', filename)
return None

View File

@ -159,7 +159,7 @@ class ZipNumCluster(CDXSource):
info = dict(pages=pages,
pageSize=pagesize,
blocks=blocks)
return json.dumps(info)
return json.dumps(info) + '\n'
def compute_page_range(self, reader, query):
pagesize = query.page_size