mirror of
https://github.com/yhirose/cpp-httplib
synced 2026-06-08 18:30:49 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f1b62c2b3 | |||
| c30906a541 | |||
| 3533503323 |
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user