diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-07-14 23:30:33 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-07-14 23:30:33 +0000 |
| commit | 982001658e3e55d320d747717fcf8e56c2cec1b6 (patch) | |
| tree | b28b3350d032f0ef50021d36909c52fc0be02f97 /lib/python/Plugins/Extensions/WebInterface | |
| parent | c2028c9cf56b0c23813bcbf0fae06f3123bbadd0 (diff) | |
| download | enigma2-982001658e3e55d320d747717fcf8e56c2cec1b6.tar.gz enigma2-982001658e3e55d320d747717fcf8e56c2cec1b6.zip | |
fix static responses
Diffstat (limited to 'lib/python/Plugins/Extensions/WebInterface')
| -rw-r--r-- | lib/python/Plugins/Extensions/WebInterface/plugin.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/python/Plugins/Extensions/WebInterface/plugin.py b/lib/python/Plugins/Extensions/WebInterface/plugin.py index c61424c8..84a82331 100644 --- a/lib/python/Plugins/Extensions/WebInterface/plugin.py +++ b/lib/python/Plugins/Extensions/WebInterface/plugin.py @@ -4,14 +4,14 @@ sessions = [ ] def startWebserver(): from twisted.internet import reactor - from twisted.web2 import server, http, static, resource, stream + from twisted.web2 import server, http, static, resource, stream, http_headers, responsecode import webif class ScreenPage(resource.Resource): def render(self, req): global sessions if sessions == [ ]: - return http.Response("please wait until enigma has booted") + return http.Response(200, stream="please wait until enigma has booted") s = stream.ProducerStream() webif.renderPage(s, req, sessions[0]) # login? @@ -21,7 +21,8 @@ def startWebserver(): addSlash = True def render(self, req): - return 'Hello! you want probably go to <a href="/test">the test</a> instead.' + return http.Response(responsecode.OK, {'Content-type': http_headers.MimeType('text', 'html')}, + stream='Hello! you want probably go to <a href="/test">the test</a> instead.') child_test = ScreenPage() # "/test" child_hdd = static.File("/hdd") |
