multiuser pkg

This commit is contained in:
MinRK
2014-06-19 17:03:28 -07:00
parent 4ad6b7e302
commit bd7ce083f4
10 changed files with 5 additions and 2 deletions

16
multiuser/headers.py Normal file
View File

@@ -0,0 +1,16 @@
import json
from tornado import web
from tornado.escape import xhtml_escape
class HeadersHandler(web.RequestHandler):
def get(self):
headers = {}
for key, value in self.request.headers.items():
if ';' in value:
value = [ s.strip() for s in value.split(';') ]
headers[key] = value
self.write("<pre>%s</pre>" % (
xhtml_escape(json.dumps(headers, indent=1))
))