From 282e22abcf3241613ec0b5877abc07f8a68575d2 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Wed, 21 May 2008 17:31:19 -0700
Subject: [PATCH] scripts/common_http.py: add comment about why we need .seek

---
 src/allmydata/scripts/common_http.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/allmydata/scripts/common_http.py b/src/allmydata/scripts/common_http.py
index f2c060bd..c654927b 100644
--- 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
-- 
2.45.2