Index: http.py
===================================================================
--- http.py	(revision 10173)
+++ http.py	(working copy)
@@ -10,7 +10,7 @@
     """
     def process_response(self, request, response):
         response['Date'] = http_date()
-        if not response.has_header('Content-Length'):
+        if not response.has_header('Content-Length') and response._is_string:
             response['Content-Length'] = str(len(response.content))
 
         if response.has_header('ETag'):
