Another ticket.
This commit is contained in:
parent
aa68be645f
commit
fa2f142bc9
|
@ -247,6 +247,7 @@ class HTTPServer(object):
|
||||||
offset = content_range.start
|
offset = content_range.start
|
||||||
|
|
||||||
# TODO limit memory usage
|
# TODO limit memory usage
|
||||||
|
# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3872
|
||||||
data = request.content.read(content_range.stop - content_range.start + 1)
|
data = request.content.read(content_range.stop - content_range.start + 1)
|
||||||
try:
|
try:
|
||||||
bucket = self._uploads[storage_index].shares[share_number]
|
bucket = self._uploads[storage_index].shares[share_number]
|
||||||
|
@ -303,6 +304,7 @@ class HTTPServer(object):
|
||||||
start = 0
|
start = 0
|
||||||
while True:
|
while True:
|
||||||
# TODO should probably yield to event loop occasionally...
|
# TODO should probably yield to event loop occasionally...
|
||||||
|
# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3872
|
||||||
data = bucket.read(start, start + 65536)
|
data = bucket.read(start, start + 65536)
|
||||||
if not data:
|
if not data:
|
||||||
request.finish()
|
request.finish()
|
||||||
|
@ -323,6 +325,7 @@ class HTTPServer(object):
|
||||||
offset, end = range_header.ranges[0]
|
offset, end = range_header.ranges[0]
|
||||||
|
|
||||||
# TODO limit memory usage
|
# TODO limit memory usage
|
||||||
|
# https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3872
|
||||||
data = bucket.read(offset, end - offset)
|
data = bucket.read(offset, end - offset)
|
||||||
|
|
||||||
request.setResponseCode(http.PARTIAL_CONTENT)
|
request.setResponseCode(http.PARTIAL_CONTENT)
|
||||||
|
|
Loading…
Reference in New Issue