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:
c983baf
)
return_http_staus fix http2 defeating body addition
author
Andy Green
<andy.green@linaro.org>
Thu, 13 Nov 2014 23:21:02 +0000
(07:21 +0800)
committer
Andy Green
<andy.green@linaro.org>
Thu, 13 Nov 2014 23:21:02 +0000
(07:21 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/server.c
patch
|
blob
|
history
diff --git
a/lib/server.c
b/lib/server.c
index
057ad69
..
1132122
100644
(file)
--- a/
lib/server.c
+++ b/
lib/server.c
@@
-1038,13
+1038,13
@@
LWS_VISIBLE int libwebsockets_return_http_status(
return 1;
m = libwebsocket_write(wsi, start, p - start, LWS_WRITE_HTTP_HEADERS);
- if (m)
- return
m
;
+ if (m
!= (int)(p - start)
)
+ return
1
;
n = sprintf((char *)start, "<html><body><h1>%u</h1>%s</body></html>", code, html_body);
m = libwebsocket_write(wsi, start, n, LWS_WRITE_HTTP);
- return m;
+ return m
!= n
;
}
/**