ran clang-format

This commit is contained in:
The-EDev 2022-02-11 01:04:32 +03:00
parent 9a7677bf1a
commit 4e2074dcb5
No known key found for this signature in database
GPG Key ID: 51C45DC0C413DCD9
2 changed files with 7 additions and 7 deletions

View File

@ -154,13 +154,13 @@ namespace crow
// HTTP1.1 = always send keep_alive, HTTP1.0 = only send if header exists, HTTP?.? = never send
keep_alive = (http_major == 1 && http_minor == 0) ?
((flags & F_CONNECTION_KEEP_ALIVE) ? true : false) :
((http_major == 1 && http_minor == 1) ? true : false);
((flags & F_CONNECTION_KEEP_ALIVE) ? true : false) :
((http_major == 1 && http_minor == 1) ? true : false);
// HTTP1.1 = only close if close header exists, HTTP1.0 = always close unless keep_alive header exists, HTTP?.?= never close
close_connection = (http_major == 1 && http_minor == 0) ?
((flags & F_CONNECTION_KEEP_ALIVE) ? false : true) :
((http_major == 1 && http_minor == 1) ? ((flags & F_CONNECTION_CLOSE) ? true : false) : false);
((flags & F_CONNECTION_KEEP_ALIVE) ? false : true) :
((http_major == 1 && http_minor == 1) ? ((flags & F_CONNECTION_CLOSE) ? true : false) : false);
}
/// Take the parsed HTTP request data and convert it to a \ref crow.request

View File

@ -702,8 +702,8 @@ namespace crow
data[i] = replacement;
}
else if ((c == '/') || (c == '\\'))
{
if (CROW_UNLIKELY( i == 0 )) //Prevent Unix Absolute Paths (Windows Absolute Paths are prevented with `(c == ':')`)
{
if (CROW_UNLIKELY(i == 0)) //Prevent Unix Absolute Paths (Windows Absolute Paths are prevented with `(c == ':')`)
{
data[i] = replacement;
}
@ -711,9 +711,9 @@ namespace crow
{
checkForSpecialEntries = true;
}
}
}
}
}
} // namespace utility
} // namespace crow