Again we treat user code sending zero length things as a bug in user code.
But Autobahn insists to be able to do it, so now we allow it.
That buys us a pass on Autobahn test 1.1.1 (the first of a bazillion)
Reproduce with
libwebsockets-test-echo --client localhost --port 9001 -u "/runCase?case=1&agent=libwebsockets" -v -d 65535 -n 1
Signed-off-by: Andy Green <andy.green@linaro.org>
int pre = 0, n;
size_t orig_len = len;
- if (len == 0 && protocol != LWS_WRITE_CLOSE &&
- protocol != LWS_WRITE_PING && protocol != LWS_WRITE_PONG) {
- lwsl_warn("zero length lws_write attempt\n");
- return 0;
- }
-
if (protocol == LWS_WRITE_HTTP ||
protocol == LWS_WRITE_HTTP_FINAL ||
protocol == LWS_WRITE_HTTP_HEADERS)