diff options
Diffstat (limited to '')
-rw-r--r-- | csci4131/hw4/strap012/strap012.py | 7 |
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() |