diff --git a/meep_example_app.py b/meep_example_app.py index 6e646a4..79e58f1 100644 --- a/meep_example_app.py +++ b/meep_example_app.py @@ -116,7 +116,7 @@ def login(self, environ, start_response): ##if we have a valid username and password this is not executed s.append(render_page("login.html", username=username)) - return [''.join(s)] + return [''.join(s)] # CTB: you should do this in templates! def logout(self, environ, start_response): # get cookie if there is one @@ -225,7 +225,7 @@ def create_user(self, environ, start_response): ##if we have a valid username and password this is not executed s.append(render_page("create_user.html", username=username)) - return [''.join(s)] + return [''.join(s)] # CTB: templates? def list_messages(self, environ, start_response): threads = meeplib.get_all_threads() diff --git a/serve2.py b/serve2.py index da93f36..b060bc6 100644 --- a/serve2.py +++ b/serve2.py @@ -54,12 +54,12 @@ def handle_request(request): path_info = fullQueryList[0] tmpVariables = fullQueryList[1].split('&') for variablePair in tmpVariables: - key,value = variablePair.split('=') + key,value = variablePair.split('=') # see urlparse.parse_qs (CTB) form_dict[key] = urllib.unquote_plus(value) # scoop up the odd case (POST request) if requestInfoList[0] == "POST": - post_variables = allLines[-1] + post_variables = allLines[-1] # see urlparse.parse_qs (CTB) tmpVariables = post_variables.split('&') for variablePair in tmpVariables: if variablePair != '': @@ -102,7 +102,7 @@ def handle_request(request): if type(data) is str: response += "Content-Length: %d\r\n\r\n" % (len(data)) response += data - elif type(data) is list: + elif type(data) is list: # CTB: why would this occur?? response += "Content-Length: %d\r\n\r\n" % (len(data[0])) response += data[0]