mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +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()
|
||||
return []
|
||||
|
||||
if hasattr(self.body, '__iter__'):
|
||||
return self.body
|
||||
else:
|
||||
return [str(self.body)]
|
||||
return self.body
|
||||
|
||||
def __repr__(self):
|
||||
return str(vars(self))
|
||||
|
@ -144,7 +144,7 @@ class QueryHandler(object):
|
||||
|
||||
wburl.LATEST_REPLAY:
|
||||
{'sort': 'reverse',
|
||||
'filter': ['statuscode:[23]..'],
|
||||
'filter': ['statuscode:[23]..|-'],
|
||||
'limit': '1',
|
||||
'resolveRevisits': True,
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ class ReplayView(object):
|
||||
content_length_str)
|
||||
out.close()
|
||||
|
||||
return content
|
||||
return [content]
|
||||
|
||||
def _redirect_if_needed(self, wbrequest, cdx):
|
||||
if wbrequest.options['is_proxy']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user