Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BZ-62497: Make r.ap_auth_type writable via mod_lua #67

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/manual/mod/mod_lua.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/mod/mod_lua.xml.fr
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 6 additions & 0 deletions modules/lua/lua_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading