moonbridge
changeset 36:b841dc424baf
Avoid caching of request.get_params and request.post_params to allow modification of request.get_params_list and request.post_params_list; Allow writing to request.get_params and request.post_params
author | jbe |
---|---|
date | Mon Mar 02 00:53:14 2015 +0100 (2015-03-02) |
parents | 2d7e3028d993 |
children | c89d8d442987 |
files | moonbridge_http.lua |
line diff
1.1 --- a/moonbridge_http.lua Fri Feb 27 00:53:40 2015 +0100 1.2 +++ b/moonbridge_http.lua Mon Mar 02 00:53:14 2015 +0100 1.3 @@ -118,9 +118,10 @@ 1.4 } 1.5 local params_metatable = { 1.6 __index = function(self, key) 1.7 - local value = params_list_mapping[self][key][1] 1.8 - self[key] = value 1.9 - return value 1.10 + return params_list_mapping[self][key][1] 1.11 + end, 1.12 + __newindex = function(self, key, value) 1.13 + params_list_mapping[self][key] = {value} 1.14 end, 1.15 __pairs = function(self) 1.16 return nextvalue, params_list_mapping[self], nil