[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/testing/dochttp.py -
avoid unnecessary str.strip() call (thanks, Florent!)
Fred L. Drake, Jr.
fdrake at gmail.com
Wed Aug 10 12:54:08 EDT 2005
Log message for revision 37841:
- avoid unnecessary str.strip() call (thanks, Florent!)
- be more careful that we only avoid adding "..." if the Content-Length is
explicitly 0, not when it is not set
Changed:
U Zope3/trunk/src/zope/app/testing/dochttp.py
-=-
Modified: Zope3/trunk/src/zope/app/testing/dochttp.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/dochttp.py 2005-08-10 16:15:26 UTC (rev 37840)
+++ Zope3/trunk/src/zope/app/testing/dochttp.py 2005-08-10 16:54:08 UTC (rev 37841)
@@ -134,10 +134,10 @@
for i in range(len(response.headers)):
h, v = response.headers[i]
if h == "Content-Length":
- content_length = int(v.strip())
+ content_length = int(v)
response.headers[i] = (h, "...")
lines = response.header_lines()
- if lines and content_length:
+ if lines and content_length == 0:
lines.append("...")
else:
lines = response.lines()
More information about the Zope3-Checkins
mailing list