-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello.py
More file actions
18 lines (16 loc) · 846 Bytes
/
hello.py
File metadata and controls
18 lines (16 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python
def app(environ, start_response):
data = []
for line in environ["QUERY_STRING"].split("&"):
data.append((line+"\n").encode())
start_response('200 OK', [('Content-Type', 'text/plain')])
return data
"""
#!/usr/bin/python
def app(environ, start_response):
data = ''
for line in environ["QUERY_STRING"].split("&"):
data = data + line + '\n'
start_response('200 OK', [('Content-Type', 'text/plain')])
return [data.encode()]
"""