Index: tests/test_exactproxy.txt
===================================================================
--- tests/test_exactproxy.txt	(revision 7825)
+++ tests/test_exactproxy.txt	(working copy)
@@ -38,7 +38,7 @@
         'GET',
         '/testform',
         '',
-        {'Host': 'example.com:80'})
+        {'Host': 'example.com:80', 'Content-Length': 0})
     Called httplib.HTTPConnection.getresponse()
     Called httpresponse.getheader('content-length')
     Called httpresponse.read()
@@ -55,7 +55,7 @@
         'GET',
         '/testform',
         '',
-        {'Host': 'example.com:80'})
+        {'Host': 'example.com:80', 'Content-Length': 0})
     Called httplib.HTTPConnection.getresponse()
     Called httpresponse.getheader('content-length')
     Called httpresponse.read()
@@ -76,7 +76,7 @@
         'GET',
         '/testform',
         '',
-        {'Host': 'example.com:80'})
+        {'Host': 'example.com:80', 'Content-Length': 0})
     Called httplib.HTTPConnection.getresponse()
     Called httpresponse.getheader('content-length')
     Called httpresponse.read()
@@ -102,8 +102,34 @@
         'POST',
         '/testform?test=result',
         'var=value&var2=value2',
-        {'Host': 'differenthost.com'})
+        {'Host': 'differenthost.com', 'Content-Length': 21})
     Called httplib.HTTPConnection.getresponse()
     Called httpresponse.getheader('content-length')
     Called httpresponse.read()
     Called httplib.HTTPConnection.close()
+
+A large response::
+
+    >>> from wsgiproxy.exactproxy import BLOCK_SIZE
+    >>> set_response('200 Ok', h(content_type='application/unknow'), 'chunk '*BLOCK_SIZE)
+    >>> req = Request.blank('http://download-example.com/testfile')
+    >>> res = send(req)
+    Called httplib.HTTPConnection('download-example.com:80')
+    Called httplib.HTTPConnection.request(
+        'GET',
+        '/testfile',
+        '',
+        {'Host': 'download-example.com:80', 'Content-Length': 0})
+    Called httplib.HTTPConnection.getresponse()
+    Called httpresponse.getheader('content-length')
+    Called httpresponse.read()
+    Called httplib.HTTPConnection.close()
+    >>> len(res.body) > BLOCK_SIZE
+    True
+    >>> print res # doctest: +ELLIPSIS
+    200 Ok
+    content-type: application/unknow
+    Content-Length: 393216
+    <BLANKLINE>
+    chunk chunk chunk chunk chunk chunk chunk ...
+    

