uridecoding support optional semicolon as delimiter
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
f1cf5bec53
commit
4036b51690
2 changed files with 9 additions and 1 deletions
|
@ -324,7 +324,7 @@ int lws_parse(struct lws *wsi, unsigned char c)
|
|||
switch (wsi->u.hdr.ups) {
|
||||
case URIPS_IDLE:
|
||||
/* genuine delimiter */
|
||||
if (c == '&' && !enc) {
|
||||
if ((c == '&' || c == ';') && !enc) {
|
||||
issue_char(wsi, c);
|
||||
/* swallow the terminator */
|
||||
ah->frags[ah->nfrag].len--;
|
||||
|
|
|
@ -83,6 +83,14 @@ check 2 "Root_Channels_1_Channel_name_http_post=?"
|
|||
check 3 "Root_Channels_1_Channel_location_http_post=?"
|
||||
check
|
||||
|
||||
echo
|
||||
echo "---- ? processing (/cgi-bin/settings.js?key1=value1)"
|
||||
rm -f /tmp/lwscap
|
||||
echo -e "GET /cgi-bin/settings.js?key1=value1 HTTP/1.1\x0d\x0a\x0d\x0a" | nc $SERVER $PORT | sed '1,/^\r$/d'> /tmp/lwscap
|
||||
check 1 "key1=value1"
|
||||
check
|
||||
|
||||
|
||||
echo
|
||||
echo "---- ? processing (%2f%2e%2e%2f%2e./test.html?arg=1)"
|
||||
rm -f /tmp/lwscap
|
||||
|
|
Loading…
Add table
Reference in a new issue