diff options
Diffstat (limited to 'module/web/bottle.py')
-rw-r--r-- | module/web/bottle.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/web/bottle.py b/module/web/bottle.py index 8335f112b..8d4570bb7 100644 --- a/module/web/bottle.py +++ b/module/web/bottle.py @@ -342,6 +342,9 @@ class Request(threading.local): self._COOKIES[cookie.key] = cookie.value return self._COOKIES + def HEADER(self, header): + """Returns HTTP header""" + return self._environ.get(header, '') class Response(threading.local): """ Represents a single response using thread-local namespace. """ @@ -548,7 +551,7 @@ def run(app=None, server=WSGIRefServer, host='127.0.0.1', port=8080, **kargs): print 'Listening on http://%s:%d/' % (server.host, server.port) print 'Use Ctrl-C to quit.' print - +pri try: server.run(app) except KeyboardInterrupt: |