Modified: Zope3/trunk/src/zope/app/testing/dochttp.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/dochttp.py 2005-08-09 18:33:26 UTC (rev
37819)
+++ Zope3/trunk/src/zope/app/testing/dochttp.py 2005-08-09 20:00:55 UTC (rev
37820)
@@ -129,13 +129,15 @@
print ' >>> print http(r"""'
print ' ...', '\n ... '.join(request.lines())+'""")'
if response.code in (301, 302, 303) and clean_redirects:
+ content_length = None
if response.headers:
for i in range(len(response.headers)):
h, v = response.headers[i]
if h == "Content-Length":
+ content_length = int(v.strip())
No need to strip(), int() does that by itself.
Florent
response.headers[i] = (h, "...")
lines = response.header_lines()
- if lines:
+ if lines and content_length:
lines.append("...")
else:
lines = response.lines()
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
_______________________________________________
Zope3-dev mailing list
[email protected]
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com