From bfcc09a8ded4f59e0f8be08dec3924097a9af656 Mon Sep 17 00:00:00 2001 From: Unbit Date: Sun, 24 Mar 2013 21:05:21 +0100 Subject: [PATCH] prepare for cookie management in internal routing --- core/protocol.c | 7 +++++++ uwsgi.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/core/protocol.c b/core/protocol.c index 337d86ca..86da9ed7 100644 --- a/core/protocol.c +++ b/core/protocol.c @@ -354,6 +354,13 @@ static int uwsgi_proto_check_11(struct wsgi_request *wsgi_req, char *key, char * return 0; } + if (!uwsgi_proto_key("HTTP_COOKIE", 11)) { + wsgi_req->cookie = buf; + wsgi_req->cookie_len = len; + return 0; + } + + if (!uwsgi_proto_key("UWSGI_APPID", 11)) { wsgi_req->appid = buf; wsgi_req->appid_len = len; diff --git a/uwsgi.h b/uwsgi.h index 9ecf203a..083fb204 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -1236,6 +1236,9 @@ struct uwsgi_router { char *referer; uint16_t referer_len; + char *cookie; + uint16_t cookie_len; + char *path_info; uint16_t path_info_len; int path_info_pos;