1
0
mirror of synced 2025-04-19 00:24:02 +03:00

clang-format

This commit is contained in:
yhirose 2025-03-16 21:22:22 -04:00
parent 0be0526085
commit 7a212cfe40

View File

@ -5723,7 +5723,8 @@ inline bool parse_www_authenticate(const Response &res,
bool is_proxy) { bool is_proxy) {
auto auth_key = is_proxy ? "Proxy-Authenticate" : "WWW-Authenticate"; auto auth_key = is_proxy ? "Proxy-Authenticate" : "WWW-Authenticate";
if (res.has_header(auth_key)) { if (res.has_header(auth_key)) {
thread_local auto re = std::regex(R"~((?:(?:,\s*)?(.+?)=(?:"(.*?)"|([^,]*))))~"); thread_local auto re =
std::regex(R"~((?:(?:,\s*)?(.+?)=(?:"(.*?)"|([^,]*))))~");
auto s = res.get_header_value(auth_key); auto s = res.get_header_value(auth_key);
auto pos = s.find(' '); auto pos = s.find(' ');
if (pos != std::string::npos) { if (pos != std::string::npos) {
@ -7583,7 +7584,7 @@ inline bool ClientImpl::read_response_line(Stream &strm, const Request &req,
#ifdef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR #ifdef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR
thread_local const std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r?\n"); thread_local const std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r?\n");
#else #else
thread_local const std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n"); thread_local const std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n");
#endif #endif
std::cmatch m; std::cmatch m;