Removed unnecessary if; if data is '', the format string will do the right thing.

This commit is contained in:
Ryan Williams
2010-02-17 13:49:45 -08:00
parent 6ab203867b
commit 116d0bbe81

View File

@@ -270,11 +270,7 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
if use_chunked[0]:
## Write the chunked encoding
if data:
towrite.append("%x\r\n%s\r\n" % (len(data), data))
else:
# last-chunk format
towrite.append("0\r\n\r\n")
towrite.append("%x\r\n%s\r\n" % (len(data), data))
else:
towrite.append(data)
try: