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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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_) {