CPPHTTPLIB_NO_DEFAULT_USER_AGENT skips default user agent (#1201)

pull/1205/head
au-ee 6 months ago committed by GitHub
parent bb00a23116
commit 64d001162b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      httplib.h

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

Loading…
Cancel
Save