projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ae432a
)
scripts/common_http.py: add comment about why we need .seek
author
Brian Warner
<warner@allmydata.com>
Thu, 22 May 2008 00:31:19 +0000
(17:31 -0700)
committer
Brian Warner
<warner@allmydata.com>
Thu, 22 May 2008 00:31:19 +0000
(17:31 -0700)
src/allmydata/scripts/common_http.py
patch
|
blob
|
history
diff --git
a/src/allmydata/scripts/common_http.py
b/src/allmydata/scripts/common_http.py
index f2c060bd826f6506e04d40d1ed3a09b653511d4b..c654927b848dc5c4be35f0fb1a199a2334e02282 100644
(file)
--- a/
src/allmydata/scripts/common_http.py
+++ b/
src/allmydata/scripts/common_http.py
@@
-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