@@ -3326,7 +3326,7 @@ find_content_type(const std::string &path,
33263326 auto ext = file_extension (path);
33273327
33283328 auto it = user_data.find (ext);
3329- if (it != user_data.end ()) { return it->second . c_str () ; }
3329+ if (it != user_data.end ()) { return it->second ; }
33303330
33313331 using udl::operator " " _t;
33323332
@@ -6082,7 +6082,7 @@ inline bool Server::handle_file_request(const Request &req, Response &res,
60826082
60836083 if (detail::is_file (path)) {
60846084 for (const auto &kv : entry.headers ) {
6085- res.set_header (kv.first . c_str () , kv.second );
6085+ res.set_header (kv.first , kv.second );
60866086 }
60876087
60886088 auto mm = std::make_shared<detail::mmap>(path.c_str ());
@@ -6992,15 +6992,15 @@ inline bool ClientImpl::redirect(Request &req, Response &res, Error &error) {
69926992 } else {
69936993 if (next_scheme == " https" ) {
69946994#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
6995- SSLClient cli (next_host. c_str () , next_port);
6995+ SSLClient cli (next_host, next_port);
69966996 cli.copy_settings (*this );
69976997 if (ca_cert_store_) { cli.set_ca_cert_store (ca_cert_store_); }
69986998 return detail::redirect (cli, req, res, path, location, error);
69996999#else
70007000 return false ;
70017001#endif
70027002 } else {
7003- ClientImpl cli (next_host. c_str () , next_port);
7003+ ClientImpl cli (next_host, next_port);
70047004 cli.copy_settings (*this );
70057005 return detail::redirect (cli, req, res, path, location, error);
70067006 }
@@ -7478,7 +7478,7 @@ inline Result ClientImpl::Get(const std::string &path, const Params ¶ms,
74787478 if (params.empty ()) { return Get (path, headers); }
74797479
74807480 std::string path_with_query = append_query_params (path, params);
7481- return Get (path_with_query. c_str () , headers, progress);
7481+ return Get (path_with_query, headers, progress);
74827482}
74837483
74847484inline Result ClientImpl::Get (const std::string &path, const Params ¶ms,
@@ -7498,7 +7498,7 @@ inline Result ClientImpl::Get(const std::string &path, const Params ¶ms,
74987498 }
74997499
75007500 std::string path_with_query = append_query_params (path, params);
7501- return Get (path_with_query. c_str () , headers, response_handler,
7501+ return Get (path_with_query, headers, response_handler,
75027502 content_receiver, progress);
75037503}
75047504
@@ -7601,7 +7601,7 @@ inline Result ClientImpl::Post(const std::string &path, const Headers &headers,
76017601 const auto &content_type =
76027602 detail::serialize_multipart_formdata_get_content_type (boundary);
76037603 const auto &body = detail::serialize_multipart_formdata (items, boundary);
7604- return Post (path, headers, body, content_type. c_str () );
7604+ return Post (path, headers, body, content_type);
76057605}
76067606
76077607inline Result ClientImpl::Post (const std::string &path, const Headers &headers,
@@ -7614,7 +7614,7 @@ inline Result ClientImpl::Post(const std::string &path, const Headers &headers,
76147614 const auto &content_type =
76157615 detail::serialize_multipart_formdata_get_content_type (boundary);
76167616 const auto &body = detail::serialize_multipart_formdata (items, boundary);
7617- return Post (path, headers, body, content_type. c_str () );
7617+ return Post (path, headers, body, content_type);
76187618}
76197619
76207620inline Result
0 commit comments