]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
scripts/common_http.py: add comment about why we need .seek
authorBrian Warner <warner@allmydata.com>
Thu, 22 May 2008 00:31:19 +0000 (17:31 -0700)
committerBrian Warner <warner@allmydata.com>
Thu, 22 May 2008 00:31:19 +0000 (17:31 -0700)
src/allmydata/scripts/common_http.py

index f2c060bd826f6506e04d40d1ed3a09b653511d4b..c654927b848dc5c4be35f0fb1a199a2334e02282 100644 (file)
@@ -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