summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changes-entries/pr62497.txt2
-rw-r--r--docs/manual/mod/mod_lua.xml2
-rw-r--r--docs/manual/mod/mod_lua.xml.fr2
-rw-r--r--modules/lua/lua_request.c6
4 files changed, 10 insertions, 2 deletions
diff --git a/changes-entries/pr62497.txt b/changes-entries/pr62497.txt
new file mode 100644
index 0000000000..c4f555d066
--- /dev/null
+++ b/changes-entries/pr62497.txt
@@ -0,0 +1,2 @@
+ *) mod_lua: Make r.ap_auth_type writable. PR 62497.
+ [Michael Osipov <michaelo apache.org>]
diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml
index 3a85d6ec8c..38528f9465 100644
--- a/docs/manual/mod/mod_lua.xml
+++ b/docs/manual/mod/mod_lua.xml
@@ -360,7 +360,7 @@ end
<tr>
<td><code>ap_auth_type</code></td>
<td>string</td>
- <td>no</td>
+ <td>yes</td>
<td>If an authentication check was made, this is set to the type
of authentication (f.x. <code>basic</code>)</td>
</tr>
diff --git a/docs/manual/mod/mod_lua.xml.fr b/docs/manual/mod/mod_lua.xml.fr
index 3931ad5e50..b61b43e711 100644
--- a/docs/manual/mod/mod_lua.xml.fr
+++ b/docs/manual/mod/mod_lua.xml.fr
@@ -383,7 +383,7 @@ end
<tr>
<td><code>ap_auth_type</code></td>
<td>string</td>
- <td>non</td>
+ <td>oui</td>
<td>Ce champ contient le type d'authentification effectuée
(par exemple <code>basic</code>)</td>
</tr>
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c
index 6787bbfaf7..15605cd76c 100644
--- a/modules/lua/lua_request.c
+++ b/modules/lua/lua_request.c
@@ -2551,6 +2551,12 @@ static int req_newindex(lua_State *L)
request_rec *r = ap_lua_check_request_rec(L, 1);
key = luaL_checkstring(L, 2);
+ if (0 == strcmp("ap_auth_type", key)) {
+ const char *value = luaL_checkstring(L, 3);
+ r->ap_auth_type = apr_pstrdup(r->pool, value);
+ return 0;
+ }
+
if (0 == strcmp("args", key)) {
const char *value = luaL_checkstring(L, 3);
r->args = apr_pstrdup(r->pool, value);