From 92be81f133bf5540942268d0ea6ae52fe7b75f94 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Tue, 11 Feb 2014 16:57:07 +0000 Subject: [PATCH] mod_lua: Fix r:setcookie() to add, rather than replace, the Set-Cookie header. PR56105 Submitted By: Kevin J Walters , Edward Lu Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1567221 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ modules/lua/lua_request.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b74e8b32cf..f432db8081 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + + *) mod_lua: Fix r:setcookie() to add, rather than replace, + the Set-Cookie header. PR56105 + [Kevin J Walters , Edward Lu ] *) mod_proxy_fcgi: Fix error message when an unexpected protocol version number is received from the application. PR 56110. [Jeff Trawick] diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 33b91e2d5e..0c19cef351 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -1987,7 +1987,7 @@ static int lua_set_cookie(lua_State *L) } } out = apr_psprintf(r->pool, "%s=%s; %s %s", key, value, secure ? "Secure;" : "", expires ? strexpires : ""); - apr_table_set(r->headers_out, "Set-Cookie", out); + apr_table_add(r->headers_out, "Set-Cookie", out); return 0; } -- 2.40.0