You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2014/03/28 21:43:16 UTC
svn commit: r1582881 - /httpd/httpd/trunk/modules/lua/lua_apr.c
Author: humbedooh
Date: Fri Mar 28 20:43:15 2014
New Revision: 1582881
URL: http://svn.apache.org/r1582881
Log:
Add a note on t->r checking, as per RĂ¼diger's email.
Modified:
httpd/httpd/trunk/modules/lua/lua_apr.c
Modified: httpd/httpd/trunk/modules/lua/lua_apr.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_apr.c?rev=1582881&r1=1582880&r2=1582881&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_apr.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_apr.c Fri Mar 28 20:43:15 2014
@@ -41,6 +41,10 @@ static int lua_table_set(lua_State *L)
const char *key = luaL_checkstring(L, 2);
const char *val = luaL_checkstring(L, 3);
/* 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
+ disregard checking whether t->r is defined.
+ */
if (strcmp(t->n, "notes") && ap_strchr_c(val, '\n')) {
char *badchar;
char *replacement = apr_pstrdup(t->r->pool, val);