Skip to content

Commit c935aa5

Browse files
committed
Merge branch 'develop' for 0.7.5
2 parents de403c4 + 43805c6 commit c935aa5

28 files changed

+158
-75
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.arc -text
2+
*.warc -text
3+
*.cdx -text
4+
*.gz -text

CHANGES.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
pywb 0.7.5 changelist
2+
~~~~~~~~~~~~~~~~~~~~~
3+
4+
* Cross platform fixes to support Windows -- all tests pass on Linux, OS X and Windows now. Improved cross-platform support includes:
5+
- read all files as binary to avoid line ending issues
6+
- properly convert url <-> file
7+
- avoid platform dependent apis
8+
9+
* Change any unhandled exceptions to result in a 500 error, instead of 400.
10+
11+
* More compresensive client side ``src`` attribute rewriting (via wombat.js), additional server-side HTML tag rewriting.
12+
13+
114
pywb 0.7.2 changelist
215
~~~~~~~~~~~~~~~~~~~~~
316

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PyWb 0.7.2
1+
PyWb 0.7.5
22
==========
33

44
.. image:: https://travis-ci.org/ikreymer/pywb.png?branch=master
@@ -13,7 +13,7 @@ pywb is a python implementation of web archival replay tools, sometimes also kno
1313
pywb allows high-quality replay (browsing) of archived web data stored in standardized `ARC <http://en.wikipedia.org/wiki/ARC_(file_format)>`_ and `WARC <http://en.wikipedia.org/wiki/Web_ARChive>`_.
1414
The replay system is designed to accurately replay complex dynamic sites, including video and audio content.
1515

16-
pywb can be used as a traditional web application or an HTTP or HTTPS proxy server.
16+
pywb can be used as a traditional web application or an HTTP or HTTPS proxy server, and has been tested on Linux, OS X and Windows platforms.
1717

1818
pywb is also fully compliant with the `Memento <http://mementoweb.org/>`_ protocol (`RFC-7089 <http://tools.ietf.org/html/rfc7089>`_).
1919

pywb/cdx/cdxsource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, filename):
3030
def load_cdx(self, query):
3131
def do_open():
3232
try:
33-
source = open(self.filename)
33+
source = open(self.filename, 'rb')
3434
gen = iter_range(source, query.key, query.end_key)
3535
for line in gen:
3636
yield line

pywb/cdx/test/test_redis_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
def load_cdx_into_redis(source, filename, key=None):
2828
# load a cdx into mock redis
29-
with open(test_cdx_dir + filename) as fh:
29+
with open(test_cdx_dir + filename, 'rb') as fh:
3030
for line in fh:
3131
zadd_cdx(source, line, key)
3232

pywb/cdx/zipnum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def load_loc(self):
8484
self.loc_mtime = new_mtime
8585

8686
logging.debug('Loading loc from: ' + self.loc_filename)
87-
with open(self.loc_filename) as fh:
87+
with open(self.loc_filename, 'rb') as fh:
8888
for line in fh:
8989
parts = line.rstrip().split('\t')
9090
self.loc_map[parts[0]] = parts[1:]
@@ -112,7 +112,7 @@ def lookup_loc(self, part):
112112
def load_cdx(self, query):
113113
self.load_loc()
114114

115-
reader = open(self.summary)
115+
reader = open(self.summary, 'rb')
116116

117117
idx_iter = iter_range(reader,
118118
query.key,

pywb/framework/certauth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414

1515
#=================================================================
16-
# Duration of 100 years
17-
CERT_DURATION = 100 * 365 * 24 * 60 * 60
16+
# Duration of 10 years
17+
CERT_DURATION = 10 * 365 * 24 * 60 * 60
1818

1919
CERTS_DIR = './ca/certs/'
2020

pywb/framework/proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def handle_cert_install(self, env):
334334
return None
335335

336336
buff = ''
337-
with open(self.ca.ca_file) as fh:
337+
with open(self.ca.ca_file, 'rb') as fh:
338338
buff = fh.read()
339339

340340
content_type = 'application/x-x509-ca-cert'

pywb/framework/test/test_certauth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from pywb.framework.certauth import main, CertificateAuthority
77

8-
TEST_CA_DIR = './pywb/framework/test/pywb_test_ca_certs'
9-
TEST_CA_ROOT = './pywb/framework/test/pywb_test_ca.pem'
8+
TEST_CA_DIR = os.path.join('.', 'pywb', 'framework', 'test', 'pywb_test_ca_certs')
9+
TEST_CA_ROOT = os.path.join('.', 'pywb', 'framework', 'test', 'pywb_test_ca.pem')
1010

1111
def setup_module():
1212
openssl_support = pytest.importorskip("OpenSSL")

pywb/framework/test/test_wsgi_wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def response(env, start_response):
1414

1515
class TestErrApp:
1616
def __call__(self, env):
17-
raise Exception('Test Error')
17+
raise Exception('Test Unexpected Error')
1818

1919
class TestCustomErrApp:
2020
def __call__(self, env):
@@ -41,8 +41,8 @@ def test_err_app():
4141
testapp = webtest.TestApp(the_app)
4242
resp = testapp.get('/abc', expect_errors=True)
4343

44-
assert resp.status_int == 400
45-
assert '400 Bad Request Error: Test Error' in resp.body
44+
assert resp.status_int == 500
45+
assert '500 Internal Server Error Error: Test Unexpected Error' in resp.body
4646

4747
def test_custom_err_app():
4848
the_app = init_app(initer(TestCustomErrApp), load_yaml=False)

0 commit comments

Comments
 (0)