| 197 | } |
| 198 | |
| 199 | std::string HTTPServerRequest::toStringForLogging() const |
| 200 | { |
| 201 | return fmt::format( |
| 202 | "Method: {}, Address: {}, User-Agent: {}{}, Content Type: {}, Transfer Encoding: {}, X-Forwarded-For: {}", |
| 203 | getMethod(), |
| 204 | clientAddress().toString(), |
| 205 | get("User-Agent", "(none)"), |
| 206 | (hasContentLength() ? fmt::format(", Length: {}", getContentLength()) : ("")), |
| 207 | getContentType(), |
| 208 | getTransferEncoding(), |
| 209 | get("X-Forwarded-For", "(none)")); |
| 210 | } |
| 211 | |
| 212 | } |
no test coverage detected