Commit Graph
3470 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) e8ee7c64bd updated m4/ax_*.m4 macros 2020-12-23 22:57:55 +03:00
Evgeny Grin (Karlson2k) 6d7f0a8f54 Fixed and muted compiler warnings 2020-12-23 22:40:59 +03:00
Evgeny Grin (Karlson2k) aee82048c2 Even more reduced number of test iterations on W32 to avoid ports exhaust 2020-12-23 21:26:26 +03:00
Evgeny Grin (Karlson2k) c65894267b Improved vector-send handling on W32
Fixed compiler warning, simplified code
2020-12-23 19:08:20 +03:00
Evgeny Grin (Karlson2k) 2d0ecf9393 Refined TCP_NOPUSH handling on OpenBSD 2020-12-22 19:48:39 +03:00
Evgeny Grin (Karlson2k) 736fe430cb MHD_send_sendfile_: Fixed wrong send size.
Fixed typo, 9e45e2486f regression
2020-12-22 03:59:26 +03:00
Evgeny Grin (Karlson2k) eaae7f5c54 daemon.c: Fixed copy-paste error 2020-12-22 01:32:00 +03:00
Evgeny Grin (Karlson2k) 4aeab8d849 configure: minor fixes 2020-12-22 01:23:31 +03:00
Evgeny Grin (Karlson2k) 7c73528933 Fixed: avoided SIGPIPE if possiible
Added blocking of SIGPIPE on daemon threads.
Added tracking of SIGPIPE suppressions on sockets.
Added fallback to normal send() instead of sendfile() and writev() if
SIGPIPE is not blocked.
2020-12-21 13:28:32 +03:00
Evgeny Grin (Karlson2k) 70201b593e daemon.c: fixed build
Regression from 822802f218
2020-12-20 21:17:01 +03:00
Evgeny Grin (Karlson2k) 822802f218 new connection: small refactoring for readability 2020-12-19 11:03:40 +03:00
Evgeny Grin (Karlson2k) 2381276a15 Do not reset buffering on added connection
Buffering is handled completely in mhd_send.c
2020-12-19 10:44:05 +03:00
Evgeny Grin (Karlson2k) d87dcd8309 MHD_send_hdr_and_body_: minor fixes for W32 2020-12-16 20:17:14 +03:00
Evgeny Grin (Karlson2k) 3c2c1d3aa9 Fixed typo
Regression from d1d9637605
2020-12-16 17:16:19 +03:00
Evgeny Grin (Karlson2k) d1d9637605 mhd_send.c: added support for vector-send on W32 2020-12-16 15:21:12 +03:00
Evgeny Grin (Karlson2k) 35c2a1eb81 mhd_send.c: minor code and comment fixes 2020-12-16 15:17:52 +03:00
Evgeny Grin (Karlson2k) 259f7659f5 Fixed debug build without TLS support 2020-12-16 15:08:50 +03:00
Evgeny Grin (Karlson2k) 5bd045bdb5 Updated W32 resource files 2020-12-15 22:12:58 +03:00
Evgeny Grin (Karlson2k) d98105b91b Fixed compiler warning 2020-12-15 22:09:00 +03:00
Evgeny Grin (Karlson2k) c1115185b8 Muted some compiler warnings 2020-12-13 21:27:23 +03:00
Evgeny Grin (Karlson2k) ef091c941a mhd_send.c: fixed warnings 2020-12-13 20:54:32 +03:00
Evgeny Grin (Karlson2k) a120d27045 mhd_send.c: renamed function, moved doxy
Function MHD_send_on_connection_() renamed to a shorte MHD_send_data_().
Doxy moved to the header.
Removed declaration of unused enum MHD_SendSocketOptions.
2020-12-13 19:50:12 +03:00
Evgeny Grin (Karlson2k) 179f57bce2 mhd_send.c: streamlined code, fixed doxy
Header pushing/not pushing is now correctly handled in
function MHD_send_hdr_and_body_(), no need to use broken logic
in MHD_send_on_connection_(). Replaced parameter
enum MHD_SendSocketOptions options with simple bool value.
2020-12-13 19:43:08 +03:00
Evgeny Grin (Karlson2k) 005c768699 mhd_send.c: fixed: properly handle send errors
Fixed busy-waiting with epoll and sendmsg().
2020-12-13 18:35:27 +03:00
Evgeny Grin (Karlson2k) ee8b319806 MHD_send_hdr_and_body_: deduplicated code 2020-12-13 17:39:08 +03:00
Evgeny Grin (Karlson2k) 526de1a8e1 MHD_send_hdr_and_body_: streamlined code 2020-12-13 17:37:14 +03:00
Evgeny Grin (Karlson2k) 75e49713c6 mhd_send.c: Fixed: body and header pushing logic 2020-12-13 17:24:36 +03:00
Evgeny Grin (Karlson2k) cd8294e59d MHD_send: renamed function for clarity, moved doxy
Renamed MHD_send_on_connection2_ to MHD_send_hdr_and_body_ to reflect
function action. Doxy moved to the header and fixed.
2020-12-13 14:25:07 +03:00
Evgeny Grin (Karlson2k) 275990c32f Send reply: minor optimisation and readability 2020-12-13 13:25:30 +03:00
Evgeny Grin (Karlson2k) 9c70bc5551 Do not send dynamic response body with header
Fixed regression introduced by 3b435274a2
Do not use response dynamic data while responses have
connection-specific data and need to be locked
2020-12-13 13:12:51 +03:00
Evgeny Grin (Karlson2k) e09b6df63e Fixed sending response body for the HEAD requests
Sometimes response body as available but MHD must not send it, like for
HEAD requests. This commit fixed regression caused by usage of
MHD_send_on_connection2_ ().
2020-12-12 18:44:15 +03:00
Evgeny Grin (Karlson2k) 3b435274a2 Simplified call of MHD_send_on_connection2_() 2020-12-12 17:39:09 +03:00
Evgeny Grin (Karlson2k) ca8693dacc struct MHD_Response: minor clarification 2020-12-12 15:36:24 +03:00
Evgeny Grin (Karlson2k) 5f9f3f06a4 fixed: really use sendmsg() for header and body
Previously 'data_buffer_size' was incorrectly used as the size of
the response. 'data_buffer_size' is always zero for static responses.
2020-12-12 15:04:06 +03:00
Evgeny Grin (Karlson2k) 0ee242e3a9 mhd_send: emulate sendmsg when sendmsg unsupported
Use second send() to send reply body. It is more efficient as keeps
caches hot.
2020-12-12 13:30:31 +03:00
Evgeny Grin (Karlson2k) 4ce620be91 MHD_send_on_connection2_(): handle oversized
Fixed handling of oversized buffers
2020-12-11 21:39:55 +03:00
Evgeny Grin (Karlson2k) d4acdb285f new_connection_prepare_(): removed extra sys-call 2020-12-11 20:28:06 +03:00
Evgeny Grin (Karlson2k) 9e45e2486f mhd_send.c: partial re-write, fixed, portability
Full re-write of sockets buffering and data pushing.
Fixed portability for non-Linux systems.
Lowered number of additional sys-calls.
Added workaround logic if main buffer/data push calls failed.
2020-12-11 20:24:55 +03:00
Evgeny Grin (Karlson2k) 4bc408168d mhd_socket.c: fixed: unneeded zero-send on *BSD
No need for zero-send on *BSD/Darwin if cork is set
2020-12-05 17:45:34 +03:00
Evgeny Grin (Karlson2k) 964c8e951e mhd_sockets: added helper macros
New macros identify OS network behavior
2020-12-05 15:58:11 +03:00
Evgeny Grin (Karlson2k) 08039fcf03 mhd_send.c: use wrapper macro for send() 2020-12-04 11:55:38 +03:00
Evgeny Grin (Karlson2k) 23b704ee3d mhd_send.c: avoid double checking of parameter
For TLS transmissions buffer_size was checked two times for overflow.
2020-12-04 11:40:47 +03:00
Evgeny Grin (Karlson2k) 47ec146ce3 Added missing macro rename
Introduced by c900f818ca
2020-12-03 20:16:36 +03:00
Evgeny Grin (Karlson2k) b9e0a0ac45 Stopped using sk_cork_on for TCP_NODELAY tracking.
Replaced sk_cork_on with tri-state sk_corked.
TCP_NODELAY is tracked on separate member.
2020-12-03 19:51:02 +03:00
Evgeny Grin (Karlson2k) 0e0ad2b238 Added: track TCP_NODELAY state of client sockets 2020-12-01 21:23:48 +03:00
Evgeny Grin (Karlson2k) 5df7108873 daemon.c: fixed: set TCP_NODELAY for externally added connections as well
if platform suppots TCP_CORK or TCP_NOPUSH
2020-12-01 20:06:44 +03:00
Evgeny Grin (Karlson2k) 331bc62916 mhd_send: renamed functions and parameters to reflect the key purpose.
The most important is to push the last piece of data.
The buffering is mostly a bonus.
2020-12-01 19:11:53 +03:00
Evgeny Grin (Karlson2k) 34593987ca mhd_send: fixed for C90 compilers 2020-11-30 00:52:04 +03:00
Evgeny Grin (Karlson2k) 958d8704e8 Removed gnutls_record_(un)cork() usage.
gnutls_record_cork()/gnutls_record_uncork() needs
special handling to periodically push part of the buffer.
2020-11-30 00:35:18 +03:00
Evgeny Grin (Karlson2k) 8435c616da mhd_send: fixed compatibility with platforms without TCP_CORK and TCP_NOPUSH
TCP_NODELAY must be turned of *before* send()
otherwise it doesn't push buffered data.
2020-11-29 23:04:24 +03:00