Sort the list of source files before passing them to the kernel-doc
script so that it always outputs the discovered functions and
structures in the same order.
This is the initial push of a fuzzing proxy we will use for testing lws.
Run libwebsockets-test-fuzxy and the test server if it's local.
Then run the test client with
http_proxy=localhost:8880 libwebsockets-test-client localhost (or whatever)
Right now he only fuzzes one thing but he is operational as a proxy.
This adds redirect support to the client side. Lws will follow
server redirects (301) up to three deep.
Signed-off-by: Andy Green <andy.green@linaro.org>
In most cases the close api will see it should send the CCE because
we are still in the waiting server reply state until the end of the
interpretation. Only if we completed the interpretation and moved
on to ESTABLISHED do we need to handle sending it ourselves.
Signed-off-by: Andy Green <andy.green@linaro.org>
After "rerelease"
https://github.com/warmcat/libwebsockets/issues/392#issuecomment-170003294
Since we introduced partial buffering a long while ago,
user code shold never see partial sends and very few
user callbsck attempt to deal with them.
Let's just eliminate the whole concept of user callback
partial send handling under any circumstances.
Signed-off-by: Andy Green <andy.green@linaro.org>
Remove declarations of callback and extension_callback as these are
functions declared in header but not defined anywhere.
Also rename typedefs callback_function and extension_callback_function
to lws_callback_function and lws_extension_callback_function so all
symbolx exported by header have lws prefix;
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
Considering we go through it once per incoming char, the tests to see if we
should be checking utf-8 are too expensive... move them to a bit that lives
in the wsi and set them once per frame (except for CLOSE who has to update
after the close code has been skipped).
Signed-off-by: Andy Green <andy.green@linaro.org>
Server side has had immediate RX flow control for quite a while.
But client side made do with RX continuing until what had been received was exhausted.
For what Autobahn tests, that's not enough.
This patch gives clientside RX flow control the same immediate effect as the server
side enjoys, re-using the same code.
Signed-off-by: Andy Green <andy.green@linaro.org>
Because extensions may use them, we didn't reject on reserved opc or bits set,
just ignored. But the standard does say we should, so now we do.
Signed-off-by: Andy Green <andy.green@linaro.org>
We only supported those specific control packet payloads up to 124.
125 is the correct limit.
Lws was consistent about the wrong limit so there are no other
issues. It doesn't affect user ABI correcting it either.
Signed-off-by: Andy Green <andy.green@linaro.org>
If the final message fragment contains a payload that has to be
handled in multiple RX callbacks, until now we reported the ws
fragment header FIN state in lws_is_final_fragment().
That was correct, but it's kind of not useful to hear that the
intermediate bufferloads are "final". So now we delay
reporting the logical ws fragment FIN until the final part of
his payload is delivered.
This gets us Autobahn 1.1.6 working.
Signed-off-by: Andy Green <andy.green@linaro.org>
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>
If we enabled libev support, generate a test server variant that uses it.
Libev has sets its face against fixing its warnings and says -Werror is
"stupid". So we work around it for the problems their apis cause in
Travis.
Signed-off-by: Andy Green <andy.green@linaro.org>
This adds an api lws_close_reason() which lets you control what will
be sent in the close frame when the connection is closed by returning
nonzero from the user callback.
The test server demo is extended to prove it works in both directions.
With this, we should have nice close support.
https://github.com/warmcat/libwebsockets/issues/196
Signed-off-by: Andy Green <andy.green@linaro.org>
It saves us ~4KB of lwsl_info / _debug etc strings.
The test app comes in at 114KB then, including 19KB of html, png and ico assets.
Signed-off-by: Andy Green <andy.green@linaro.org>