1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-24 06:59:52 +01:00

rangecache: Add check for X-Ignore-Range-Arg header to force ignoring

range= and serving full request. (For use with nginx range cache
handling)
This commit is contained in:
Ilya Kreymer 2014-12-07 19:55:24 -08:00
parent 881d550abe
commit 80d4fa6e29

View File

@ -55,6 +55,10 @@ class RangeCache(object):
if result: if result:
range_h, url = result range_h, url = result
if wbrequest.env.get('HTTP_X_IGNORE_RANGE_ARG'):
wbrequest.wb_url.url = url
return None
# check for standard range header # check for standard range header
if not range_h: if not range_h:
range_h = wbrequest.env.get('HTTP_RANGE') range_h = wbrequest.env.get('HTTP_RANGE')