kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 53cbc1a21eeb558477591e7154952b64195e5354
parent f1fa108f98046c4a6d948145e22253f027d03240
Author: Joris Vink <joris@coders.se>
Date:   Thu,  2 May 2013 12:11:56 +0200

make sure we advance the host buffer properly

Diffstat:
src/http.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/http.c b/src/http.c @@ -292,11 +292,13 @@ http_header_recv(struct netbuf *nb) return (KORE_RESULT_ERROR); } - if (strlen(host[0]) != 4 || strncasecmp(host[0], "host", 4)) { + if (strlen(host[0]) != 4 || strncasecmp(host[0], "host", 4) || + strlen(host[1]) < 3) { free(hbuf); return (KORE_RESULT_ERROR); } + host[1]++; if (!http_request_new(c, NULL, host[1], request[0], request[1], &req)) { free(hbuf); return (KORE_RESULT_ERROR);