Mercurial Hosting > luan
diff src/luan/modules/http/tools/run.luan @ 1150:0842b9b570f8
change http headers interface
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 04 Feb 2018 18:03:37 -0700 |
parents | ea7112e9eb1d |
children | 21d157b153fe |
line wrap: on
line diff
--- a/src/luan/modules/http/tools/run.luan Sun Feb 04 17:23:20 2018 -0700 +++ b/src/luan/modules/http/tools/run.luan Sun Feb 04 18:03:37 2018 -0700 @@ -76,7 +76,7 @@ return function() local content_type = Http.request.parameter.content_type if content_type ~= nil then - Http.response.header.content_type = content_type + Http.response.headers["content-type"] = content_type end Io.stdout = Http.response.text_writer() local code = Http.request.parameter.code @@ -91,7 +91,7 @@ end; catch = function(e) Http.response.reset() - Http.response.header.content_type = "text/plain" + Http.response.headers["content-type"] = "text/plain" Io.stdout = Http.response.text_writer() print(e) print""