The second table returned by parseargs() should contain a map from a query string argument name to an array filled with its values, but this array always contains just one element, having the last value specified in the query string for that parameter. This is because lua_request.c uses ap_args_to_table, which in turn uses apr_table_set instead of apr-table-add. Not being sure if apr_args_to_table is intentionally written that way or if it's just a bug, I patched lua_request.c. Please note that this patch also includes another one regarding set_output_filter().
Created attachment 35926 [details] Diff file to patch lua_request.c