QA
This commit is contained in:
parent
719f735309
commit
fddebfcfae
4 changed files with 19 additions and 17 deletions
|
@ -2477,8 +2477,8 @@ lws_server_socket_service(struct lws_context *context, struct lws *wsi,
|
|||
__func__);
|
||||
wsi->seen_zero_length_recv = 1;
|
||||
lws_change_pollfd(wsi, LWS_POLLIN, 0);
|
||||
// goto try_pollout;
|
||||
goto fail;
|
||||
goto try_pollout;
|
||||
//goto fail;
|
||||
|
||||
case LWS_SSL_CAPABLE_ERROR:
|
||||
goto fail;
|
||||
|
|
|
@ -135,11 +135,14 @@ lws_ssl_client_bio_create(struct lws *wsi)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if defined(LWS_HAVE_SSL_set_alpn_protos) && defined(LWS_HAVE_SSL_get0_alpn_selected)
|
||||
#if defined(LWS_HAVE_SSL_set_alpn_protos) && \
|
||||
defined(LWS_HAVE_SSL_get0_alpn_selected)
|
||||
#if defined(LWS_WITH_HTTP2)
|
||||
if (wsi->use_ssl & LCCSCF_NOT_H2) {
|
||||
plist += 3;
|
||||
n -= 3;
|
||||
}
|
||||
#endif
|
||||
SSL_set_alpn_protos(wsi->ssl, plist, n);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ function check {
|
|||
fi
|
||||
|
||||
if [ "$1" == "1" ] ; then
|
||||
a="`dd if=$LOG bs=1 skip=$LEN 2>/dev/null |grep URI\ Arg\ 1\: | tr -s ' ' | cut -d' ' -f5-`"
|
||||
a="`dd if=$LOG bs=1 skip=$LEN 2>/dev/null |grep URI\ Arg\ 1\: | tr -s ' ' | cut -d' ' -f7-`"
|
||||
if [ "$a" != "$2" ] ; then
|
||||
echo "Arg 1 '$a' not $2"
|
||||
exit 1
|
||||
|
@ -85,14 +85,14 @@ function check {
|
|||
fi
|
||||
|
||||
if [ "$1" == "2" ] ; then
|
||||
a="`dd if=$LOG bs=1 skip=$LEN 2>/dev/null |grep URI\ Arg\ 2\: | tr -s ' ' | cut -d' ' -f5-`"
|
||||
a="`dd if=$LOG bs=1 skip=$LEN 2>/dev/null |grep URI\ Arg\ 2\: | tr -s ' ' | cut -d' ' -f7-`"
|
||||
if [ "$a" != "$2" ] ; then
|
||||
echo "Arg 2 '$a' not $2"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ "$1" == "3" ] ; then
|
||||
a="`dd if=$LOG bs=1 skip=$LEN 2>/dev/null |grep URI\ Arg\ 3\: | tr -s ' ' | cut -d' ' -f5-`"
|
||||
a="`dd if=$LOG bs=1 skip=$LEN 2>/dev/null |grep URI\ Arg\ 3\: | tr -s ' ' | cut -d' ' -f7-`"
|
||||
if [ "$a" != "$2" ] ; then
|
||||
echo "Arg 3 '$a' not $2"
|
||||
exit 1
|
||||
|
@ -343,7 +343,7 @@ for i in \
|
|||
/...// \
|
||||
/.../a \
|
||||
/.../w \
|
||||
/.../? \
|
||||
"/.../?" \
|
||||
/.../% \
|
||||
/../.. \
|
||||
/.././ \
|
||||
|
@ -355,7 +355,7 @@ for i in \
|
|||
/../// \
|
||||
/..//a \
|
||||
/..//w \
|
||||
/..//? \
|
||||
"/..//?" \
|
||||
/..//% \
|
||||
/../a. \
|
||||
/../a/ \
|
||||
|
@ -551,7 +551,7 @@ echo ==== $R
|
|||
|
||||
|
||||
if [ "$R" != "403" ]; then
|
||||
U=`cat $LOG | grep lws_http_serve | tail -n 1 | cut -d':' -f3 | cut -d' ' -f2`
|
||||
U=`cat $LOG | grep lws_http_serve | tail -n 1 | cut -d':' -f6 | cut -d' ' -f2`
|
||||
echo $U
|
||||
echo "- \"$i\" -> $R \"$U\"" >>/tmp/results
|
||||
else
|
||||
|
@ -577,7 +577,7 @@ cat <<EOF >/tmp/lwsresult1
|
|||
- "/..///" -> 200 "/"
|
||||
- "/..//a" -> 415 "/a"
|
||||
- "/..//w" -> 415 "/w"
|
||||
- "/..//1" -> 415 "/1"
|
||||
- "/..//?" -> 200 "/"
|
||||
- "/..//%" -> 403
|
||||
- "/../a." -> 415 "/a."
|
||||
- "/../a/" -> 406 "/a/"
|
||||
|
@ -628,7 +628,7 @@ cat <<EOF >/tmp/lwsresult1
|
|||
- "//..//" -> 200 "/"
|
||||
- "//../a" -> 415 "/a"
|
||||
- "//../w" -> 415 "/w"
|
||||
- "//../1" -> 415 "/1"
|
||||
- "//../?" -> 200 "/"
|
||||
- "//../%" -> 403
|
||||
- "//..a." -> 415 "/..a."
|
||||
- "//..a/" -> 406 "/..a/"
|
||||
|
|
|
@ -339,7 +339,7 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
if (longlived)
|
||||
mirror_lifetime += 500000;
|
||||
|
||||
lwsl_info("opened mirror connection with "
|
||||
lwsl_notice("opened mirror connection with "
|
||||
"%d lifetime\n", mirror_lifetime);
|
||||
|
||||
/*
|
||||
|
@ -355,7 +355,7 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
lws_callback_on_writable(wsi);
|
||||
break;
|
||||
|
||||
case LWS_CALLBACK_CLOSED:
|
||||
case LWS_CALLBACK_CLIENT_CLOSED:
|
||||
lwsl_notice("mirror: LWS_CALLBACK_CLOSED mirror_lifetime=%d, "
|
||||
"rxb %d, rx_count %d\n", mirror_lifetime, rxb,
|
||||
rx_count);
|
||||
|
@ -411,12 +411,11 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
if (!justmirror)
|
||||
mirror_lifetime--;
|
||||
if (!mirror_lifetime) {
|
||||
lwsl_info("closing mirror session\n");
|
||||
lwsl_notice("closing mirror session\n");
|
||||
return -1;
|
||||
}
|
||||
/* get notified as soon as we can write again */
|
||||
if (!justmirror)
|
||||
lws_callback_on_writable(wsi);
|
||||
lws_callback_on_writable(wsi);
|
||||
|
||||
#if !defined(_WIN32) && !defined(WIN32)
|
||||
usleep(250);
|
||||
|
@ -583,7 +582,7 @@ int main(int argc, char **argv)
|
|||
memset(&info, 0, sizeof info);
|
||||
|
||||
lwsl_notice("libwebsockets test client - license LGPL2.1+SLE\n");
|
||||
lwsl_notice("(C) Copyright 2010-2017 Andy Green <andy@warmcat.com>\n");
|
||||
lwsl_notice("(C) Copyright 2010-2018 Andy Green <andy@warmcat.com>\n");
|
||||
|
||||
if (argc < 2)
|
||||
goto usage;
|
||||
|
|
Loading…
Add table
Reference in a new issue