# HG changeset patch # User jbe # Date 1425253994 -3600 # Node ID b841dc424baf3eb242534c0cbc2001432aad2763 # Parent 2d7e3028d99316f3bbab6812fcaf9fecf7b8e6c7 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 diff -r 2d7e3028d993 -r b841dc424baf moonbridge_http.lua --- a/moonbridge_http.lua Fri Feb 27 00:53:40 2015 +0100 +++ b/moonbridge_http.lua Mon Mar 02 00:53:14 2015 +0100 @@ -118,9 +118,10 @@ } local params_metatable = { __index = function(self, key) - local value = params_list_mapping[self][key][1] - self[key] = value - return value + return params_list_mapping[self][key][1] + end, + __newindex = function(self, key, value) + params_list_mapping[self][key] = {value} end, __pairs = function(self) return nextvalue, params_list_mapping[self], nil