projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e70c63b
)
clean uri arg dump
author
Andy Green
<andy.green@linaro.org>
Fri, 18 Dec 2015 02:46:24 +0000
(10:46 +0800)
committer
Andy Green
<andy.green@linaro.org>
Fri, 18 Dec 2015 02:46:24 +0000
(10:46 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-server-http.c
patch
|
blob
|
history
diff --git
a/test-server/test-server-http.c
b/test-server/test-server-http.c
index
16a49b0
..
2f4dd08
100644
(file)
--- a/
test-server/test-server-http.c
+++ b/
test-server/test-server-http.c
@@
-137,15
+137,10
@@
int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user,
dump_handshake_info(wsi);
/* dump the individual URI Arg parameters */
- m = 1;
n = 0;
- while (m > 0) {
- m = lws_hdr_copy_fragment(wsi, buf, sizeof(buf),
- WSI_TOKEN_HTTP_URI_ARGS, n);
- if (m < 0)
- continue;
- n++;
- lwsl_info("URI Arg %d: %s\n", n, buf);
+ while (lws_hdr_copy_fragment(wsi, buf, sizeof(buf),
+ WSI_TOKEN_HTTP_URI_ARGS, n) > 0) {
+ lwsl_info("URI Arg %d: %s\n", ++n, buf);
}
if (len < 1) {