uridecoding handle plus chars as space

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-01-20 09:36:56 +08:00
parent 4036b51690
commit 466ad50d6a

View file

@ -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;