Skip to content

Commit

Permalink
Revert changes where meaning is lost
Browse files Browse the repository at this point in the history
  • Loading branch information
jfsimoneau committed Nov 21, 2023
1 parent 5737569 commit 7d5d4f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4727,10 +4727,12 @@ get_range_offset_and_length(const Request &req, const Response &res,
}

inline bool expect_content(const Request &req) {
if (req.method == "POST" || req.method == "PUT" || req.method == "PATCH" ||
req.method == "PRI" || req.method == "DELETE") {
return true;
}
// TODO: check if Content-Length is set
return (req.method == "POST" || req.method == "PUT" ||
req.method == "PATCH" || req.method == "PRI" ||
req.method == "DELETE");
return false;
}

inline bool has_crlf(const std::string &s) {
Expand Down Expand Up @@ -8363,7 +8365,7 @@ inline SSLClient::SSLClient(const std::string &host, int port,
: ClientImpl(host, port, client_cert_path, client_key_path) {
ctx_ = SSL_CTX_new(TLS_client_method());

detail::split(host_.data(), &host_[host_.size()], '.',
detail::split(&host_[0], &host_[host_.size()], '.',
[&](const char *b, const char *e) {
host_components_.emplace_back(std::string(b, e));
});
Expand Down

0 comments on commit 7d5d4f6

Please sign in to comment.