Removed unnecessary if; if data is '', the format string will do the right thing.
This commit is contained in:
@@ -270,11 +270,7 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||||||
|
|
||||||
if use_chunked[0]:
|
if use_chunked[0]:
|
||||||
## Write the chunked encoding
|
## Write the chunked encoding
|
||||||
if data:
|
towrite.append("%x\r\n%s\r\n" % (len(data), data))
|
||||||
towrite.append("%x\r\n%s\r\n" % (len(data), data))
|
|
||||||
else:
|
|
||||||
# last-chunk format
|
|
||||||
towrite.append("0\r\n\r\n")
|
|
||||||
else:
|
else:
|
||||||
towrite.append(data)
|
towrite.append(data)
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user