mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
misc fixes: ensure buffered response is an iterator (no need to explicitly check, check doesn't work in jython)
query_handler: include check for '-' status code for revisits
This commit is contained in:
parent
61a9cd0dfa
commit
ba1e276e2f
@ -187,10 +187,7 @@ class WbResponse(object):
|
|||||||
self.body.close()
|
self.body.close()
|
||||||
return []
|
return []
|
||||||
|
|
||||||
if hasattr(self.body, '__iter__'):
|
return self.body
|
||||||
return self.body
|
|
||||||
else:
|
|
||||||
return [str(self.body)]
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return str(vars(self))
|
return str(vars(self))
|
||||||
|
@ -144,7 +144,7 @@ class QueryHandler(object):
|
|||||||
|
|
||||||
wburl.LATEST_REPLAY:
|
wburl.LATEST_REPLAY:
|
||||||
{'sort': 'reverse',
|
{'sort': 'reverse',
|
||||||
'filter': ['statuscode:[23]..'],
|
'filter': ['statuscode:[23]..|-'],
|
||||||
'limit': '1',
|
'limit': '1',
|
||||||
'resolveRevisits': True,
|
'resolveRevisits': True,
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ class ReplayView(object):
|
|||||||
content_length_str)
|
content_length_str)
|
||||||
out.close()
|
out.close()
|
||||||
|
|
||||||
return content
|
return [content]
|
||||||
|
|
||||||
def _redirect_if_needed(self, wbrequest, cdx):
|
def _redirect_if_needed(self, wbrequest, cdx):
|
||||||
if wbrequest.options['is_proxy']:
|
if wbrequest.options['is_proxy']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user