From 35dff751703f30904b5260889c19940bcd98795d Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Mon, 8 Mar 2021 10:52:40 -0600 Subject: fix form --- csci4131/hw4/strap012/strap012.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'csci4131/hw4/strap012/strap012.py') diff --git a/csci4131/hw4/strap012/strap012.py b/csci4131/hw4/strap012/strap012.py index 469be81..f498222 100644 --- a/csci4131/hw4/strap012/strap012.py +++ b/csci4131/hw4/strap012/strap012.py @@ -37,14 +37,13 @@ def getContents(type, file): returnValue = b"".join( [returnValue, forb.read(), "{}{}".format(CRLF, CRLF).encode()]) else: - if type == "HEAD" or "GET": - returnValue = OK.encode() - if type == "GET": - returnValue = b"".join( - [returnValue, content.read(), "{}{}".format(CRLF, CRLF).encode()]) - else: - returnValue = b"".join( - [returnValue, "{}{}".format(CRLF, CRLF).encode()]) + returnValue = OK.encode() + if type == "HEAD": + returnValue = b"".join( + [returnValue, "{}{}".format(CRLF, CRLF).encode()]) + elif type == "GET": + returnValue = b"".join( + [returnValue, content.read(), "{}{}".format(CRLF, CRLF).encode()]) elif type == "POST": print("B") else: -- cgit v1.2.3