mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
PR63971 expose apr_table_unset for headers/envvars
via nil assignment git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1870650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -39,7 +39,13 @@ static int lua_table_set(lua_State *L)
|
||||
{
|
||||
req_table_t *t = ap_lua_check_apr_table(L, 1);
|
||||
const char *key = luaL_checkstring(L, 2);
|
||||
const char *val = luaL_checkstring(L, 3);
|
||||
const char *val = luaL_optlstring(L, 3, NULL, NULL);
|
||||
|
||||
if (!val) {
|
||||
apr_table_unset(t->t, key);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Unless it's the 'notes' table, check for newline chars */
|
||||
/* t->r will be NULL in case of the connection notes, but since
|
||||
we aren't going to check anything called 'notes', we can safely
|
||||
|
Reference in New Issue
Block a user