fixes
This commit is contained in:
@ -3,6 +3,9 @@ import time
|
||||
import Event
|
||||
from logger import Logger
|
||||
import BaseHTTPServer
|
||||
import SocketServer
|
||||
import cgi
|
||||
import urlparse
|
||||
|
||||
import Entry
|
||||
|
||||
@ -18,12 +21,15 @@ class HttpCmdHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
cls.entries = entries
|
||||
cls.adminPwd = adminPwd
|
||||
|
||||
def do_POST(self):
|
||||
def do_GET(self):
|
||||
Logger.log("Request: %s" % self.path)
|
||||
if self.command == "POST":
|
||||
q = self.rfile.read(l)
|
||||
e = cgi.parse_qs(q)
|
||||
Logger.log("QUERY: %s" % str(e))
|
||||
if self.command == "GET":
|
||||
q = urlparse.urlparse(self.path).query
|
||||
c = cgi.parse_qs(q)
|
||||
cmd = c['c']
|
||||
dynid = c['d']
|
||||
sharedSecret = c['s']
|
||||
Logger.log("c: %s, d: %s, s: %s" % (cmd, dynid, sharedSecret))
|
||||
|
||||
self.send_response(200, "OK")
|
||||
self.end_headers()
|
||||
|
Reference in New Issue
Block a user