From 466ad50d6a549aa6d7ffa2c937ca7388d2c27583 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 20 Jan 2016 09:36:56 +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;