1
0
mirror of synced 2025-07-20 16:02:59 +03:00

CPPHTTPLIB_NO_DEFAULT_USER_AGENT skips default user agent (#1201)

This commit is contained in:
au-ee
2022-02-22 15:39:26 +01:00
committed by GitHub
parent bb00a23116
commit 64d001162b

View File

@ -6153,9 +6153,11 @@ inline bool ClientImpl::write_request(Stream &strm, Request &req,
if (!req.has_header("Accept")) { req.headers.emplace("Accept", "*/*"); }
#ifndef CPPHTTPLIB_NO_DEFAULT_USER_AGENT
if (!req.has_header("User-Agent")) {
req.headers.emplace("User-Agent", "cpp-httplib/0.10.2");
}
#endif
if (req.body.empty()) {
if (req.content_provider_) {