mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
http: urlarg capture fixes
This commit is contained in:
parent
e9d1782863
commit
7c6e3a8aeb
1 changed files with 2 additions and 4 deletions
|
@ -677,10 +677,8 @@ lws_parse_urldecode(struct lws *wsi, uint8_t *_c)
|
||||||
return -1;
|
return -1;
|
||||||
/* genuine delimiter */
|
/* genuine delimiter */
|
||||||
if ((c == '&' || c == ';') && !enc) {
|
if ((c == '&' || c == ';') && !enc) {
|
||||||
if (issue_char(wsi, c) < 0)
|
if (issue_char(wsi, '\0') < 0)
|
||||||
return -1;
|
return -1;
|
||||||
/* swallow the terminator */
|
|
||||||
ah->frags[ah->nfrag].len--;
|
|
||||||
/* link to next fragment */
|
/* link to next fragment */
|
||||||
ah->frags[ah->nfrag].nfrag = ah->nfrag + 1;
|
ah->frags[ah->nfrag].nfrag = ah->nfrag + 1;
|
||||||
ah->nfrag++;
|
ah->nfrag++;
|
||||||
|
@ -688,7 +686,7 @@ lws_parse_urldecode(struct lws *wsi, uint8_t *_c)
|
||||||
goto excessive;
|
goto excessive;
|
||||||
/* start next fragment after the & */
|
/* start next fragment after the & */
|
||||||
ah->post_literal_equal = 0;
|
ah->post_literal_equal = 0;
|
||||||
ah->frags[ah->nfrag].offset = ah->pos;
|
ah->frags[ah->nfrag].offset = ++ah->pos;
|
||||||
ah->frags[ah->nfrag].len = 0;
|
ah->frags[ah->nfrag].len = 0;
|
||||||
ah->frags[ah->nfrag].nfrag = 0;
|
ah->frags[ah->nfrag].nfrag = 0;
|
||||||
goto swallow;
|
goto swallow;
|
||||||
|
|
Loading…
Add table
Reference in a new issue