Skip to content

Commit 64d0011

Browse files
authored
CPPHTTPLIB_NO_DEFAULT_USER_AGENT skips default user agent (#1201)
1 parent bb00a23 commit 64d0011

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

httplib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6153,9 +6153,11 @@ inline bool ClientImpl::write_request(Stream &strm, Request &req,
61536153

61546154
if (!req.has_header("Accept")) { req.headers.emplace("Accept", "*/*"); }
61556155

6156+
#ifndef CPPHTTPLIB_NO_DEFAULT_USER_AGENT
61566157
if (!req.has_header("User-Agent")) {
61576158
req.headers.emplace("User-Agent", "cpp-httplib/0.10.2");
61586159
}
6160+
#endif
61596161

61606162
if (req.body.empty()) {
61616163
if (req.content_provider_) {

0 commit comments

Comments
 (0)