aboutsummaryrefslogtreecommitdiffstats
path: root/csci4131/hw4/strap012/strap012.py
diff options
context:
space:
mode:
Diffstat (limited to 'csci4131/hw4/strap012/strap012.py')
-rw-r--r--csci4131/hw4/strap012/strap012.py15
1 files changed, 7 insertions, 8 deletions
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: