From 8b9fe99deeffa16adc0dab19441a284c67ad5935 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 18 Dec 2015 15:23:31 +0800 Subject: [PATCH] uridecoding handle plus chars as space Signed-off-by: Andy Green --- lib/parsers.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/parsers.c b/lib/parsers.c index 2f0f4058..d5e00916 100644 --- a/lib/parsers.c +++ b/lib/parsers.c @@ -339,6 +339,9 @@ int lws_parse(struct lws *wsi, unsigned char c) ah->frags[ah->nfrag].nfrag = 0; goto swallow; } + /* + to space */ + if (c == '+' && !enc) + c = ' '; /* issue the first / always */ if (c == '/' && !ah->frag_index[WSI_TOKEN_HTTP_URI_ARGS]) wsi->u.hdr.ups = URIPS_SEEN_SLASH;