mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
minor tweaks, increase num closest searched, upper case url check
css remove fixed pos
This commit is contained in:
parent
d9930322f1
commit
cca9071c53
@ -66,7 +66,7 @@ class RemoteCDXServer:
|
||||
return response
|
||||
|
||||
@staticmethod
|
||||
def getQueryParams(wburl, limit = '150000', collapseTime = '10', replayClosest = '10'):
|
||||
def getQueryParams(wburl, limit = '150000', collapseTime = '10', replayClosest = '200'):
|
||||
return {
|
||||
|
||||
ArchivalUrl.QUERY:
|
||||
|
@ -112,8 +112,11 @@ class ReplayHandler(object):
|
||||
|
||||
# Case 4: if headers record is actually empty (eg empty revisit), then use headers from revisit
|
||||
if not headersRecord.httpHeaders:
|
||||
headersRecord.close()
|
||||
headersRecord.stream.close()
|
||||
headersRecord = payloadRecord
|
||||
else:
|
||||
headersRecord.stream.close()
|
||||
|
||||
|
||||
isRevisit = True
|
||||
|
||||
@ -221,7 +224,8 @@ class RewritingReplayHandler(ReplayHandler):
|
||||
# print e
|
||||
|
||||
finally:
|
||||
value = [out.getvalue().encode(encoding)]
|
||||
content = out.getvalue().encode(encoding)
|
||||
value = [content]
|
||||
newHeaders.append(('Content-Length', str(len(value[0]))))
|
||||
out.close()
|
||||
|
||||
|
@ -27,6 +27,8 @@ class ArchivalUrl:
|
||||
>>> repr(ArchivalUrl('/https://example.com/xyz'))
|
||||
"('latest_replay', '', '', 'https://example.com/xyz', '/https://example.com/xyz')"
|
||||
|
||||
>>> repr(ArchivalUrl('/https://example.com/xyz?a=%2f&b=%2E'))
|
||||
"('latest_replay', '', '', 'https://example.com/xyz?a=%2f&b=%2E', '/https://example.com/xyz?a=%2f&b=%2E')"
|
||||
|
||||
# Query Urls
|
||||
# ======================
|
||||
@ -92,7 +94,9 @@ class ArchivalUrl:
|
||||
elif not '://' in self.url:
|
||||
self.url = ArchivalUrl.DEFAULT_SCHEME + self.url
|
||||
|
||||
matcher = rfc3987.match(self.url, 'IRI')
|
||||
# BUG?: adding upper() because rfc3987 lib rejects lower case %-encoding
|
||||
# %2F is fine, but %2f -- standard supports either
|
||||
matcher = rfc3987.match(self.url.upper(), 'IRI')
|
||||
|
||||
if not matcher:
|
||||
raise wbexceptions.BadUrlException('Bad Request Url: ' + self.url)
|
||||
|
@ -2,7 +2,6 @@
|
||||
#_wayback_banner
|
||||
{
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
border: 1px solid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user