mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Release v0.10.5
This commit is contained in:
parent
33f67386fe
commit
d05c343602
1 changed files with 8 additions and 9 deletions
17
httplib.h
17
httplib.h
|
@ -1,21 +1,21 @@
|
||||||
//
|
//
|
||||||
// httplib.h
|
// httplib.h
|
||||||
//
|
//
|
||||||
// Copyright (c) 2021 Yuji Hirose. All rights reserved.
|
// Copyright (c) 2022 Yuji Hirose. All rights reserved.
|
||||||
// MIT License
|
// MIT License
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef CPPHTTPLIB_HTTPLIB_H
|
#ifndef CPPHTTPLIB_HTTPLIB_H
|
||||||
#define CPPHTTPLIB_HTTPLIB_H
|
#define CPPHTTPLIB_HTTPLIB_H
|
||||||
|
|
||||||
|
#define CPPHTTPLIB_VERSION_MAJOR 0
|
||||||
|
#define CPPHTTPLIB_VERSION_MINOR 10
|
||||||
|
#define CPPHTTPLIB_VERSION_PATCH 5
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configuration
|
* Configuration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CPPHTTPLIB_VERSION_MAJOR 0
|
|
||||||
#define CPPHTTPLIB_VERSION_MINOR 10
|
|
||||||
#define CPPHTTPLIB_VERSION_PATCH 4
|
|
||||||
|
|
||||||
#ifndef CPPHTTPLIB_KEEPALIVE_TIMEOUT_SECOND
|
#ifndef CPPHTTPLIB_KEEPALIVE_TIMEOUT_SECOND
|
||||||
#define CPPHTTPLIB_KEEPALIVE_TIMEOUT_SECOND 5
|
#define CPPHTTPLIB_KEEPALIVE_TIMEOUT_SECOND 5
|
||||||
#endif
|
#endif
|
||||||
|
@ -6198,10 +6198,9 @@ inline bool ClientImpl::write_request(Stream &strm, Request &req,
|
||||||
|
|
||||||
#ifndef CPPHTTPLIB_NO_DEFAULT_USER_AGENT
|
#ifndef CPPHTTPLIB_NO_DEFAULT_USER_AGENT
|
||||||
if (!req.has_header("User-Agent")) {
|
if (!req.has_header("User-Agent")) {
|
||||||
auto agent = "cpp-httplib/" +
|
auto agent = "cpp-httplib/" + std::to_string(CPPHTTPLIB_VERSION_MAJOR) +
|
||||||
std::to_string(CPPHTTPLIB_VERSION_MAJOR) + "." +
|
"." + std::to_string(CPPHTTPLIB_VERSION_MINOR) + "." +
|
||||||
std::to_string(CPPHTTPLIB_VERSION_MINOR) + "." +
|
std::to_string(CPPHTTPLIB_VERSION_PATCH);
|
||||||
std::to_string(CPPHTTPLIB_VERSION_PATCH);
|
|
||||||
req.headers.emplace("User-Agent", agent);
|
req.headers.emplace("User-Agent", agent);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue