26 #include <sys/types.h>
36 #define NO_SESSION_SID NULL
46 return (
char*)sidstr->value;
55 ApplicationAdapterHttp
this = _this;
56 HttpWorker worker = (HttpWorker)subject;
57 Session session = NULL;
58 time_t now = time(NULL);
69 if (NULL == session) {
74 nbuf = sprintf(buf,
"sid=%s;Path=/", session->id);
76 worker->additional_headers,
77 new(HttpHeader,
CSTRA(
"Set-Cookie"), buf, nbuf));
79 worker->current_response = (HttpMessage)
routerRoute(
81 worker->current_request,
Session applicationSessionGet(Application, const char *)
static char * getSessionId(Hash cookies)
void applicationSessionCleanup(Application, time_t)
#define CSTRA(val)
Const STRing Argument.
void applicationAdapterHttpUpdate(void *_this, void *subject)
void * hashGet(Hash, const char *, size_t)
void queuePut(Queue, void *)
Session applicationSessionStart(Application)
HttpResponse routerRoute(Router, HttpRequest, Session)