mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-16 00:24:48 +01:00
cdx: don't warn on .loc files, zipnum: add newline to page info response
This commit is contained in:
parent
a0878e6998
commit
a3a8b777d2
pywb/cdx
@ -176,7 +176,10 @@ class CDXServer(BaseCDXServer):
|
|||||||
if filename.endswith(('.summary', '.idx')):
|
if filename.endswith(('.summary', '.idx')):
|
||||||
return ZipNumCluster(filename, config)
|
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
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ class ZipNumCluster(CDXSource):
|
|||||||
info = dict(pages=pages,
|
info = dict(pages=pages,
|
||||||
pageSize=pagesize,
|
pageSize=pagesize,
|
||||||
blocks=blocks)
|
blocks=blocks)
|
||||||
return json.dumps(info)
|
return json.dumps(info) + '\n'
|
||||||
|
|
||||||
def compute_page_range(self, reader, query):
|
def compute_page_range(self, reader, query):
|
||||||
pagesize = query.page_size
|
pagesize = query.page_size
|
||||||
|
Loading…
x
Reference in New Issue
Block a user