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

ensure 'cdx_' modifier is working

This commit is contained in:
Ilya Kreymer 2014-03-27 14:46:59 -07:00
parent 093d8310e5
commit 41d51a6427
2 changed files with 10 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class QueryHandler(object):
cdx_iter = self.load_cdx(wbrequest, params)
if wb_url.is_replay():
if output != 'text' and wb_url.is_replay():
return (cdx_iter, self.cdx_load_callback(wbrequest))
return self.make_cdx_response(wbrequest, params, cdx_iter)

View File

@ -91,6 +91,15 @@ class TestWb:
assert 'wb.js' in resp.body
assert '/pywb/20130729195151/http://www.iana.org/domains/example"' in resp.body
def test_replay_cdx_mod(self):
resp = self.testapp.get('/pywb/20140127171239cdx_/http://www.iana.org/_css/2013.1/print.css')
self._assert_basic_text(resp)
lines = resp.body.rstrip().split('\n')
assert len(lines) == 17
assert lines[0].startswith('org,iana)/_css/2013.1/print.css 20140127171239')
def test_replay_identity_1(self):
resp = self.testapp.get('/pywb/20140127171251id_/http://example.com')