[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPRangeSupport.py:1.2.22.1
Martijn Pieters
mj@zope.com
Tue, 4 Dec 2001 17:41:43 -0500
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv29434/lib/python/ZPublisher
Modified Files:
Tag: Zope-2_4-branch
HTTPRangeSupport.py
Log Message:
Fix HTTP Range support; don't concatenate adjacent byte ranges, as this breaks
Acrobat PDF downloading.
=== Zope/lib/python/ZPublisher/HTTPRangeSupport.py 1.2 => 1.2.22.1 ===
Optimisation is done by first expanding relative start values and open
- ends, then sorting and combining overlapping or adjacent ranges. We also
- remove unsatisfiable ranges (where the start lies beyond the size of the
- resource).
+ ends, then sorting and combining overlapping ranges. We also remove
+ unsatisfiable ranges (where the start lies beyond the size of the resource).
"""
@@ -198,8 +197,8 @@
while ranges:
nextstart, nextend = ranges.pop()
- # If the next range overlaps or is adjacent
- if nextstart <= end:
+ # If the next range overlaps
+ if nextstart < end:
# If it falls within the current range, discard
if nextend <= end:
continue