aboutsummaryrefslogtreecommitdiffstats
path: root/csci4131/hw4/strap012/strap012.py
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2021-03-08 10:52:40 -0600
committerRossTheRoss <mstrapp@protonmail.com>2021-03-08 10:52:40 -0600
commit35dff751703f30904b5260889c19940bcd98795d (patch)
treeee43f673e1ba25b296ebca1ea6d104550f3eba2b /csci4131/hw4/strap012/strap012.py
parentaaa (diff)
downloadhomework-35dff751703f30904b5260889c19940bcd98795d.tar
homework-35dff751703f30904b5260889c19940bcd98795d.tar.gz
homework-35dff751703f30904b5260889c19940bcd98795d.tar.bz2
homework-35dff751703f30904b5260889c19940bcd98795d.tar.lz
homework-35dff751703f30904b5260889c19940bcd98795d.tar.xz
homework-35dff751703f30904b5260889c19940bcd98795d.tar.zst
homework-35dff751703f30904b5260889c19940bcd98795d.zip
fix form
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: