From 3451da940db404d9dfa7d2479beb3e3b5f5c2c88 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 19 Apr 2020 22:05:04 -0400 Subject: [PATCH] Code format --- httplib.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/httplib.h b/httplib.h index db9e65e..b31d80a 100644 --- a/httplib.h +++ b/httplib.h @@ -2539,12 +2539,10 @@ inline bool expect_content(const Request &req) { return false; } -inline bool has_crlf(const char* s) { +inline bool has_crlf(const char *s) { auto p = s; while (*p) { - if (*p == '\r' || *p == '\n') { - return true; - } + if (*p == '\r' || *p == '\n') { return true; } p++; } return false; @@ -3529,8 +3527,7 @@ inline bool Server::routing(Request &req, Response &res, Stream &strm) { req, res, reader, patch_handlers_for_content_reader_)) { return true; } - } - else if (req.method == "DELETE") { + } else if (req.method == "DELETE") { if (dispatch_request_for_content_reader( req, res, reader, delete_handlers_for_content_reader_)) { return true; @@ -4523,7 +4520,7 @@ inline bool process_and_close_socket_ssl( } if (ret) { - SSL_shutdown(ssl); // shutdown only if not already closed by remote + SSL_shutdown(ssl); // shutdown only if not already closed by remote } { std::lock_guard guard(ctx_mutex);