Use Libmicrohttpd as HTTP Server for Test Suite
- .gitlab-ci.yml: Add Libmicrohttpd package for CI testing using Debian/gcc, Fedora/clang and MinGW64
- .travis.sh: Add Libmicrohttpd package for OSX/clang
- .travis_setup.sh: Add Libmicrohttpd package for Debian/gcc and clang
- README.md: Add info which mentioning Libmicrohttpd as optional requirement
- configure.ac: Check for Libmicrohttpd availability
- tests/libtest.c: (_answer_to_connection): New function: related to _http_server_start function,
(_free_callback_param): New function: free callback from chunked transfer encoding processor,
(_http_server_start): New function,
(_http_server_stop): New function,
(_parse_hostname): New function to identify empty requested URL regarding IDN hostname,
(_print_header_range): New function to get HTTP header to handle Byte Serving,
(_print_query_string): New function to handle URL with query string,
(_replace_space_with_plus): New function to handle URL with query string,
(_scan_directory): New function to help HTTP server handle directory creation,
(wget_test_start_server): Modify method for calling HTTP(S) server,
(wget_test_stop_server): Modify method to stop HTTP(S) server - tests/test-auth-basic.c: Add test for wrong credentials
- tests/test-bad-chunk.c: Modify test to conform with new server
- tests/test-chunked.c: Likewise
This is follow up of [0].
To make sure this integration process doesn't prevent user to build the binary without Libmicrohttpd
installed, I make another branch to make sure it can pass the CI testing [1][2].
[0] https://github.com/rockdaboot/wget2/issues/128
[1] https://gitlab.com/dstw/wget2/tree/mhd-not-install
[2] https://github.com/dstw/wget2/tree/mhd-not-install
Edited by Didik Setiawan