Additional fix to upstream #11 - add missing CRLF

In addition to a CRLF terminating a chunk, there must be one to terminate the
chunked-body after the final chunk.
ref: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
This commit is contained in:
Patrick Carlisle
2010-02-17 10:21:00 -08:00
parent c8c0a94bd4
commit f857a2de98

View File

@@ -274,7 +274,7 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
towrite.append("%x\r\n%s\r\n" % (len(data), data))
else:
# last-chunk format
towrite.append("0\r\n")
towrite.append("0\r\n\r\n")
else:
towrite.append(data)
try: