mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-12 21:32:59 +00:00
scripts/common_http.py: add comment about why we need .seek
This commit is contained in:
parent
7ae432abf8
commit
282e22abcf
@ -29,6 +29,9 @@ def do_http(method, url, body=""):
|
||||
elif isinstance(body, unicode):
|
||||
raise RuntimeError("do_http body must be a bytestring, not unicode")
|
||||
else:
|
||||
# We must give a Content-Length header to twisted.web, otherwise it
|
||||
# seems to get a zero-length file. I suspect that "chunked-encoding"
|
||||
# may fix this.
|
||||
assert body.tell
|
||||
assert body.seek
|
||||
assert body.read
|
||||
|
Loading…
x
Reference in New Issue
Block a user