From ae91ae3f2376635127e8cda5ae12171bdd2198c1 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Wed, 30 Dec 2015 11:37:19 +0100 Subject: [PATCH] Fix Cookie Size [was to small] --- src/rest-api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest-api.c b/src/rest-api.c index 0c44a43e..dd5c59b9 100644 --- a/src/rest-api.c +++ b/src/rest-api.c @@ -508,8 +508,8 @@ ProcessApiCall: // client did not pass token on URI let's use cookies if ((!request->restfull) && (request->context != NULL)) { - char cookie[64]; - snprintf (cookie, sizeof (cookie), "%s=%s;path=/api;max-age=%d", COOKIE_NAME, request->uuid, request->config->cntxTimeout); + char cookie[256]; + snprintf (cookie, sizeof (cookie), "%s=%s;path=%s;max-age=%d", COOKIE_NAME, request->uuid, request->config->rootapi,request->config->cntxTimeout); MHD_add_response_header (webResponse, MHD_HTTP_HEADER_SET_COOKIE, cookie); } -- 2.16.6