When constructing the response the status line is constructed via:
m_responseStream << "HTTP/1.1 " << request.httpStatus << ' ' << webutils::statusCodeToReasonPhrase(request.httpStatus) << "\r\n";
This uses the ostream operator<< overload for enum statusCode. However this inserter also inserts the reason phrase.
The operator should only insert the number:
Eliminates the need for conversion (the numbers are known beforhand).
reason phrase stays independent and is only added if needed
When constructing the response the status line is constructed via:
m_responseStream << "HTTP/1.1 " << request.httpStatus << ' ' << webutils::statusCodeToReasonPhrase(request.httpStatus) << "\r\n";
This uses the ostream operator<< overload for enum statusCode. However this inserter also inserts the reason phrase.
The operator should only insert the number: