From 76df62a6236eba2ae1ea7ffe7b9599418b044a01 Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Mon, 19 Sep 2022 02:45:44 +0800 Subject: HTTP: fixed cookie parsing. The fixing supports the cookie value with the '=' character. This is related to #756 PR on Github. Thanks to changxiaocui. --- src/nxt_http_request.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 943ad82d..7a790f73 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -1035,14 +1035,11 @@ nxt_http_cookie_parse(nxt_array_t *cookies, u_char *start, const u_char *end) for (p = start; p < end; p++) { c = *p; - if (c == '=') { + if (c == '=' && name == NULL) { while (start[0] == ' ') { start++; } name_length = p - start; - - if (name_length != 0) { - name = start; - } + name = start; start = p + 1; -- cgit