From 70ebce981b3e6dfe8a12859ba43af66d7985b043 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Sat, 29 Oct 2011 19:42:32 +0000 Subject: [PATCH] make r.args read/write for rewrite refugees. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1194997 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/lua/lua_request.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index 095674d80e..d216b3c259 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,9 @@ Changes with Apache 2.3.15 PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener, ] + + *) mod_lua: Make the query string (r.args) writable. [Eric Covener] + *) mod_include: Add support for application/x-www-form-urlencoded encoding and decoding. [Graham Leggett] diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index b731881fd0..3f33c209aa 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -486,6 +486,12 @@ static int req_newindex(lua_State *L) return 0; } + if (0 == strcmp("args", key)) { + const char *value = luaL_checkstring(L, 3); + r->args = apr_pstrdup(r->pool, value); + return 0; + } + if (0 == apr_strnatcmp("user", key)) { const char *value = luaL_checkstring(L, 3); r->user = apr_pstrdup(r->pool, value); -- 2.40.0