Commit Graph
15 Commits
Author SHA1 Message Date
Christian Grothoff 2212a37256 check rvalues from pthread_mutex_ operations in examples 2023-09-25 21:26:31 +02:00
Evgeny Grin (Karlson2k) c209ce76f7 Fixed missing <errno.h> includes
While 'errno' can be defined in various headers, by standard it must
be defined in <errno.h> header.
2023-09-17 11:07:40 +03:00
Evgeny Grin (Karlson2k) 4adc14c948 Some readability improvements 2022-09-28 11:46:59 +03:00
Alexander Irion 3526ff8302 Remove double adding of MHD_HTTP_HEADER_CONNECTION response header
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>
2022-06-15 15:28:07 +03:00
Evgeny Grin (Karlson2k) 85ae657849 Replaced MHD_RESPMEM_PERSISTENT usage in examples and code
New functions do not produce compiler warnings.
2022-05-14 15:07:47 +03:00
Evgeny Grin (Karlson2k) bd41946e8f Renamed 'con_cls' -> 'req_cls' for access handler callback
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.
2022-01-18 15:18:40 +03:00
Evgeny Grin (Karlson2k) 32a10057ec Workarounds for uncrustify bugs 2021-12-09 13:51:49 +03:00
Evgeny Grin (Karlson2k) 8d50b03251 Revert formatting broken by uncrustify
This partially reverts commit dbe1d76d9c.

Looks like uncrustify has some bug resulting in C++ style comments
2021-12-09 13:33:50 +03:00
Christian Grothoff dbe1d76d9c -fix tests for libmagic (and uncrustify indentation) 2021-12-08 14:11:31 +01:00
Evgeny Grin (Karlson2k) 87ab1ec7f7 test and examples: check socket control functions results 2021-11-21 15:43:19 +03:00
Evgeny Grin (Karlson2k) f44e4bf896 websockets: fixed code style 2021-10-31 16:34:49 +03:00
David Gausmann ddad59c1e3 websocket update
- 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.
2021-10-31 16:02:31 +03:00
Evgeny Grin (Karlson2k) 1a17440608 Muted sanitizer errors on W32 platform.
Actually MinGW headers need to be fixed.
2021-10-06 11:30:42 +03:00
Christian Grothoff 5a5e402b11 fix typos 2021-04-27 23:31:58 +02:00
Christian Grothoff 450b868804 add David's WS example 2021-04-26 14:33:55 +02:00