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/02/20 12:47:48 UTC

svn commit: r1570156 - /httpd/httpd/trunk/modules/lua/lua_request.c

Author: humbedooh
Date: Thu Feb 20 11:47:47 2014
New Revision: 1570156

URL: http://svn.apache.org/r1570156
Log:
mod_lua: Slight null-check fix on setcookie.

Modified:
    httpd/httpd/trunk/modules/lua/lua_request.c

Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=1570156&r1=1570155&r2=1570156&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Thu Feb 20 11:47:47 2014
@@ -2043,12 +2043,12 @@ static int lua_set_cookie(lua_State *L) 
     }
     
     /* Create path segment */
-    if (path && strlen(path) > 0) {
+    if (path != NULL && strlen(path) > 0) {
         strpath = apr_psprintf(r->pool, "Path=\"%s\";", path);
     }
     
     /* Create domain segment */
-    if (domain && strlen(domain) > 0) {
+    if (domain != NULL && strlen(domain) > 0) {
         /* Domain does NOT like quotes in most browsers, so let's avoid that */
         strdomain = apr_psprintf(r->pool, "Domain=%s;", domain);
     }