From 15c3a8b1ef47127d30d8b5f26f9d7622a0b72656 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Thu, 25 Aug 2016 23:19:16 +0200 Subject: [PATCH] adds accepted lang to global hreq MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I6b820e7ab169897259414276eaa0b1f8847d9229 Signed-off-by: José Bollo --- src/afb-hreq.h | 1 + src/afb-hsrv.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/afb-hreq.h b/src/afb-hreq.h index 81dd3eaf..3d7954a9 100644 --- a/src/afb-hreq.h +++ b/src/afb-hreq.h @@ -41,6 +41,7 @@ struct afb_hreq { int suspended; int replied; const char *version; + const char *lang; const char *url; size_t lenurl; const char *tail; diff --git a/src/afb-hsrv.c b/src/afb-hsrv.c index 12a7fdd3..9d838381 100644 --- a/src/afb-hsrv.c +++ b/src/afb-hsrv.c @@ -142,6 +142,7 @@ static int access_handler( hreq->connection = connection; hreq->method = method; hreq->version = version; + hreq->lang = afb_hreq_get_header(hreq, MHD_HTTP_HEADER_ACCEPT_LANGUAGE); hreq->tail = hreq->url = url; hreq->lentail = hreq->lenurl = strlen(url); *recordreq = hreq; -- 2.16.6