1
0
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:
Ilya Kreymer 2014-08-15 14:23:25 -07:00
parent 61a9cd0dfa
commit ba1e276e2f
3 changed files with 3 additions and 6 deletions

View File

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

View File

@ -144,7 +144,7 @@ class QueryHandler(object):
wburl.LATEST_REPLAY:
{'sort': 'reverse',
'filter': ['statuscode:[23]..'],
'filter': ['statuscode:[23]..|-'],
'limit': '1',
'resolveRevisits': True,
}

View File

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