Skip to content

Commit 9ec8c40

Browse files
committed
Migrate to libmicrohttpd 1.0.0 API with new features
Raise minimum libmicrohttpd requirement to 1.0.0 and migrate all deprecated APIs to their v3 replacements: - Basic Auth: MHD_basic_auth_get_username_password3, MHD_queue_basic_auth_required_response3 with UTF-8 support - Digest Auth: MHD_digest_auth_check3, MHD_digest_auth_check_digest3, MHD_queue_auth_required_response3 with SHA-512/256, userhash, nonce binding, and structured digest_auth_result enum Add new response types: empty_response, pipe_response, iovec_response. Add external event loop integration (run, run_wait, get_fdset, get_timeout, add_connection), daemon management (quiesce, get_listen_fd, get_active_connections, get_bound_port), and numerous new daemon options (listen_backlog, address_reuse, tcp_fastopen_queue_size, turbo, etc.). Add conditional WebSocket support via libmicrohttpd_ws. Add utility functions: reason_phrase, is_feature_supported, get_mhd_version.
1 parent 2662f05 commit 9ec8c40

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/httpserver/websocket_handler.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class websocket_handler {
7171
virtual void on_message(websocket_session& session, std::string_view msg) = 0;
7272
virtual void on_binary(websocket_session& session, const void* data, size_t len);
7373
virtual void on_ping(websocket_session& session, std::string_view payload);
74+
virtual void on_binary(websocket_session& session, const void* data, size_t len);
75+
virtual void on_ping(websocket_session& session, std::string_view payload);
7476
virtual void on_close(websocket_session& session, uint16_t code, const std::string& reason);
7577
};
7678

src/webserver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ bool webserver::start(bool blocking) {
451451
}
452452
#endif // HAVE_WEBSOCKET
453453

454+
454455
daemon = nullptr;
455456
if (bind_address == nullptr) {
456457
daemon = MHD_start_daemon(start_conf, port, &policy_callback, this,

0 commit comments

Comments
 (0)