uridecoding handle plus chars as space

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-12-18 15:23:31 +08:00
parent 03d7e9d331
commit 8b9fe99dee

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;