Mercurial Hosting > luan
diff http/src/luan/modules/http/Http_test.luan @ 508:9218f9cf45d3
various fixes
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 May 2015 20:20:54 -0600 |
parents | 342964519194 |
children | 473e456444ff |
line wrap: on
line diff
--- a/http/src/luan/modules/http/Http_test.luan Thu May 21 17:03:57 2015 -0600 +++ b/http/src/luan/modules/http/Http_test.luan Thu May 21 20:20:54 2015 -0600 @@ -4,7 +4,7 @@ local M = {} M.welcome_file = "index.html" -M.cookies = {} +M.cookie = {} function M.get_page(path) if M.welcome_file ~= nil and path.matches ".*/" then @@ -20,7 +20,7 @@ function M.init() Http.request = Http.new_request{} - Http.request.cookies = M.cookies + Http.request.cookie = M.cookie Http.response = Http.new_response{ @@ -31,11 +31,11 @@ end; set_cookie = function(name,value) - M.cookies[name] = value + M.cookie[name] = value end; remove_cookie = function(name) - M.cookies[name] = nil + M.cookie[name] = nil end; send_redirect = function(url)