diff options
Diffstat (limited to 'src/ogClient.py')
-rw-r--r-- | src/ogClient.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ogClient.py b/src/ogClient.py index 05c243d..3f7a752 100644 --- a/src/ogClient.py +++ b/src/ogClient.py @@ -85,9 +85,10 @@ class ogClient: httpparser.parser(self.data)
print httpparser.getRequestOP()
print httpparser.getURI()
- ogprocess.processOperation(httpparser.getRequestOP(), httpparser.getURI())
-
- self.sock.send("HTTP/1.0 200 OK\r\n\r\n")
+ if not ogprocess.processOperation(httpparser.getRequestOP(), httpparser.getURI()):
+ self.sock.send("HTTP/1.0 400 Bad request\r\n\r\n")
+ else:
+ self.sock.send("HTTP/1.0 200 OK\r\n\r\n")
# Cleanup state information from request
self.data = ""
|