aboutsummaryrefslogtreecommitdiffstats
path: root/csci4131
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2021-03-09 09:47:07 -0600
committerMatthew Strapp <msattr@gmail.com>2021-03-09 09:47:07 -0600
commit94f3007e17acffda2d350077f08f582522e4af5c (patch)
tree3cb295ea40527ed5fc4a482d8bdc6fe2d8503b58 /csci4131
parentFix some small errors, begin to implement POST (diff)
downloadhomework-94f3007e17acffda2d350077f08f582522e4af5c.tar
homework-94f3007e17acffda2d350077f08f582522e4af5c.tar.gz
homework-94f3007e17acffda2d350077f08f582522e4af5c.tar.bz2
homework-94f3007e17acffda2d350077f08f582522e4af5c.tar.lz
homework-94f3007e17acffda2d350077f08f582522e4af5c.tar.xz
homework-94f3007e17acffda2d350077f08f582522e4af5c.tar.zst
homework-94f3007e17acffda2d350077f08f582522e4af5c.zip
its borked
Diffstat (limited to 'csci4131')
-rw-r--r--csci4131/hw4/strap012/strap012.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/csci4131/hw4/strap012/strap012.py b/csci4131/hw4/strap012/strap012.py
index 43b7efb..cdfbe68 100644
--- a/csci4131/hw4/strap012/strap012.py
+++ b/csci4131/hw4/strap012/strap012.py
@@ -23,7 +23,8 @@ def check_perms(resource):
def POST(form):
contents = form.decode(utf-8)
print(contents)
- return
+ ret = "<!DOCTYPE html><html><head><meta charset='utf-8'><title>Test</title></head><body>E</body></html>"
+ return ret
def getContents(type, file):
returnValue = "".encode()
@@ -49,10 +50,6 @@ def getContents(type, file):
elif type == "GET":
returnValue = b"".join(
[returnValue, content.read(), "{}{}".format(CRLF, CRLF).encode()])
- elif type == "POST":
- POST(content.read())
- #returnValue = b"".join(
- # [returnValue, POST(content.read(), "{}{}".format(CRLF, CRLF).encode())])
else:
returnValue= METHOD_NOT_ALLOWED.encode()
content.close()