X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fsession.c;h=481e04c703cf1965d60cdc52268e42ee1723cfae;hb=6930cdc6c322f88d1f3cc99622941e3d5037f74a;hp=9e25c27fb4f61ccfdf356b929416419aafca1dd6;hpb=369b595ca0a618ba8188d92ae26c4219625caa3d;p=src%2Fapp-framework-binder.git diff --git a/src/session.c b/src/session.c index 9e25c27f..481e04c7 100644 --- a/src/session.c +++ b/src/session.c @@ -449,8 +449,10 @@ PUBLIC AFB_clientCtx *ctxClientGet (AFB_request *request, int idx) { // if UUID in query we're restfull with no cookies otherwise check for cookie if (uuid != NULL) request->restfull = TRUE; else { + char cookie[64]; request->restfull = FALSE; - uuid = MHD_lookup_connection_value (request->connection, MHD_COOKIE_KIND, COOKIE_NAME); + snprintf(cookie, sizeof cookie, "%s-%d", COOKIE_NAME, request->config->httpdPort); + uuid = MHD_lookup_connection_value (request->connection, MHD_COOKIE_KIND, cookie); }; // Warning when no cookie defined MHD_lookup_connection_value may return something !!!