Skip to content

Migrate to libmicrohttpd 1.0.0 API with new features#370

Open
etr wants to merge 1 commit intomasterfrom
feature/mhd-1.0-parity
Open

Migrate to libmicrohttpd 1.0.0 API with new features#370
etr wants to merge 1 commit intomasterfrom
feature/mhd-1.0-parity

Conversation

@etr
Copy link
Owner

@etr etr commented Mar 24, 2026

Summary

  • Raise minimum libmicrohttpd requirement to 1.0.0 and migrate all deprecated APIs to their v3 replacements (Basic Auth v3, Digest Auth v3 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()
  • Add daemon management: quiesce(), get_listen_fd(), get_active_connections(), get_bound_port()
  • Add daemon options: listen_backlog, address_reuse, connection_memory_increment, tcp_fastopen_queue_size, sigpipe_handled_by_app, https_mem_dhparams, https_key_password, https_priorities_append, no_alpn, client_discipline_level
  • Add startup flags: no_listen_socket, no_thread_safety, turbo, suppress_date_header
  • Add conditional WebSocket support via libmicrohttpd_ws (websocket_handler, websocket_session, register_ws_resource())
  • Add utility functions: reason_phrase(), is_feature_supported(), get_mhd_version()

Breaking changes

  • Minimum libmicrohttpd bumped from 0.9.64 to 1.0.0
  • check_digest_auth() now returns digest_auth_result enum instead of bool + reload_nonce out-param
  • check_digest_auth_ha1() renamed to check_digest_auth_digest() to match MHD v3 naming
  • Default digest algorithm changed from MD5 to SHA-256
  • digest_auth_fail_response constructor parameter order changed; reload_nonce renamed to signal_stale

Test plan

  • Existing authentication tests updated for v3 API
  • New daemon_info integration test for daemon management methods
  • New new_response_types integration test for empty/pipe/iovec responses
  • Run make check with libmicrohttpd >= 1.0.0
  • Verify WebSocket conditional compilation (with and without libmicrohttpd_ws)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant