HEAD now actually works to spec rather than just being a different GET
This commit is contained in:
@@ -382,7 +382,8 @@ def handle_connection(connectionSocket, addr):
|
|||||||
response = ("HTTP/1.1 " + responseType + "\n").encode()
|
response = ("HTTP/1.1 " + responseType + "\n").encode()
|
||||||
response += responseHeaders
|
response += responseHeaders
|
||||||
response += b"\n"
|
response += b"\n"
|
||||||
response += responsecontent
|
if (requestType != "HEAD"):
|
||||||
|
response += responsecontent
|
||||||
|
|
||||||
numchunks = math.ceil(len(response) / 1024) if len(response) > 0 else 1
|
numchunks = math.ceil(len(response) / 1024) if len(response) > 0 else 1
|
||||||
responsechunks = []
|
responsechunks = []
|
||||||
|
|||||||
Reference in New Issue
Block a user