Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions meep_example_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions serve2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '':
Expand Down Expand Up @@ -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]

Expand Down