mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
0 is also valid FD.
This commit is contained in:
parent
7c506057b5
commit
ccb5956645
@ -572,7 +572,7 @@ class HTTPServer(object):
|
||||
fd = request.content.fileno()
|
||||
except (ValueError, OSError):
|
||||
fd = -1
|
||||
if fd > 0 and not PYCDDL_BYTES_ONLY:
|
||||
if fd >= 0 and not PYCDDL_BYTES_ONLY:
|
||||
# It's a file, so we can use mmap() to save memory.
|
||||
message = mmap.mmap(fd, 0, access=mmap.ACCESS_READ)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user