diff --git a/pywb/core/query_handler.py b/pywb/core/query_handler.py index f2685077..029b9eaa 100644 --- a/pywb/core/query_handler.py +++ b/pywb/core/query_handler.py @@ -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) diff --git a/tests/test_integration.py b/tests/test_integration.py index c5a4f43a..017a0ca8 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -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')