From 37fd4eb643f8d4f6261560ead150864827938d57 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 26 Dec 2021 07:53:56 -0500 Subject: [PATCH] Code cleanup --- httplib.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/httplib.h b/httplib.h index 159a3a5..5c4e3b8 100644 --- a/httplib.h +++ b/httplib.h @@ -3916,6 +3916,7 @@ inline std::string make_multipart_data_boundary() { // platforms, but due to lack of support in the c++ standard library, // doing better requires either some ugly hacks or breaking portability. std::random_device seed_gen; + // Request 128 bits of entropy for initialization std::seed_seq seed_sequence{seed_gen(), seed_gen(), seed_gen(), seed_gen()}; std::mt19937 engine(seed_sequence); @@ -5683,6 +5684,7 @@ inline socket_t ClientImpl::create_client_socket(Error &error) const { read_timeout_sec_, read_timeout_usec_, write_timeout_sec_, write_timeout_usec_, interface_, error); } + // Check is custom IP specified for host_ std::string ip; auto it = addr_map_.find(host_); @@ -6130,11 +6132,6 @@ inline std::unique_ptr ClientImpl::send_with_content_provider( ContentProviderWithoutLength content_provider_without_length, const char *content_type, Error &error) { - // Request req; - // req.method = method; - // req.headers = headers; - // req.path = path; - if (content_type) { req.headers.emplace("Content-Type", content_type); } #ifdef CPPHTTPLIB_ZLIB_SUPPORT