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