MHD_create_response_for_upgrade() already adds the MHD_HTTP_HEADER_CONNECTION response header, so
the additional MHD_add_response_header is wrong.
In our application it caused, that on a Apple iPad, the websocket was immediately closed by the
browser(Safari, Chrome, Opera) after the protocol upgrade. Browsers on Linux, Android did not had this issue.
Signed-off-by: Alexander Irion <alexander_irion@mentor.com>
The argument is actually request-specific, not connection specific. The
name was confusing.
Fixed related documentation and clarified usage.
Also fixed code where argument named 'unused' was actually used.
- added API documentation to libmicrohttpd.texi
- added websocket tutorial chapter to libmicrohttpd-tutorial and an much easier example for the tutorial
- added additional helper functions to ease the HTTP websocket handshake
- the code can now be compiled on Linux without errors
- changed sha1.c and sha1.h to the files provided by Evgeny (I replaced those files in src/microhttpd_ws/ with the files from src/microhttpd/ - maybe there is a smarter way...?)
- removed dependency for "htons" and "htonl" (these functions are now implemented in MHD_websocket.c; no need for OS-dependent files anymore)
- added an additional test script for testing of the library with any webbrowser (for manual practice test)
- several bugfixes
- parameters renamed
- special things clarified (fragmentation, RNG for client mode)
The new version of the API is at some points incompatible with the old version, but since it was in an experimental phase and it didn't compile on Linux, I guess this shouldn't bother anyone.
From my point of view, I am now finished with the library and it could go out of experimental.