Compare commits

...

3 Commits

Author SHA1 Message Date
yhirose 0f1b62c2b3 Release v0.13.1 2023-07-08 07:41:24 -04:00
yhirose c30906a541 Code cleanup 2023-07-07 19:43:37 -04:00
bgs99 3533503323 Fix explicit constructor warning (#1614) 2023-07-07 13:17:19 -04:00
+4 -9
View File
@@ -8,7 +8,7 @@
#ifndef CPPHTTPLIB_HTTPLIB_H
#define CPPHTTPLIB_HTTPLIB_H
#define CPPHTTPLIB_VERSION "0.13.0"
#define CPPHTTPLIB_VERSION "0.13.1"
/*
* Configuration
@@ -5275,7 +5275,7 @@ inline PathParamsMatcher::PathParamsMatcher(const std::string &pattern) {
}
inline bool PathParamsMatcher::match(Request &request) const {
request.matches = {};
request.matches = std::smatch();
request.path_params.clear();
request.path_params.reserve(param_names_.size());
@@ -6262,15 +6262,10 @@ Server::process_request(Stream &strm, bool close_connection,
if (!line_reader.getline()) { return false; }
Request req;
Response res;
res.version = "HTTP/1.1";
for (const auto &header : default_headers_) {
if (res.headers.find(header.first) == res.headers.end()) {
res.headers.insert(header);
}
}
res.headers = default_headers_;
#ifdef _WIN32
// TODO: Increase FD_SETSIZE statically (libzmq), dynamically (MySQL).