| 261 | } |
| 262 | |
| 263 | std::string http_server_request::get_response() { |
| 264 | std::string response = "HTTP/1.0 " + std::to_string(status) + " OK\r\n"; |
| 265 | set_response_header("Content-Length", std::to_string(response_body.length())); |
| 266 | for (const auto& header : response_headers) { |
| 267 | response += header.first + ": " + header.second + "\r\n"; |
| 268 | } |
| 269 | response += "\r\n"; |
| 270 | response += response_body; |
| 271 | return response; |
| 272 | } |
| 273 | |
| 274 | void http_server_request::close() { |
| 275 | state = HTTPS_DONE; |
nothing calls this directly
no test coverage detected