diff options
author | Steven Barth <steven@midlink.org> | 2008-05-06 22:43:04 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-06 22:43:04 +0000 |
commit | 19f41f03ff3cb70742f8ea7b3ed3c7a03b2cfaa0 (patch) | |
tree | 2b1a8c76c8776f9b2a8a0afcf2c048b3940d7989 /core/src | |
parent | fc65325c174e13cc1a9329d154e74069257ebb12 (diff) |
* Fixed ffluci.sgi.webuci
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ffluci/sgi/webuci.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/src/ffluci/sgi/webuci.lua b/core/src/ffluci/sgi/webuci.lua index c60964662e..222304b41a 100644 --- a/core/src/ffluci/sgi/webuci.lua +++ b/core/src/ffluci/sgi/webuci.lua @@ -25,6 +25,8 @@ limitations under the License. ]]-- module("ffluci.sgi.webuci", package.seeall) +local status_set = false + -- HTTP interface -- Returns a table of all COOKIE, GET and POST Parameters @@ -86,10 +88,15 @@ end -- Set Content-Type function ffluci.http.set_content_type(type) + if not status_set then + ffluci.http.set_status(200, "OK") + end + print("Content-Type: "..type.."\n") end -- Sets HTTP-Status-Header function ffluci.http.set_status(code, message) - print(webuci.REQUEST_METHOD .. " " .. tostring(code) .. " " .. message) + print(webuci.SERVER_PROTOCOL .. " " .. tostring(code) .. " " .. message) + status_set = true end |