diff --git a/changelog.md b/changelog.md index fcb32eba56..ba526534f1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,6 @@ HEAD +- Changes default HTTP response error code when no http_handler is defined from + 500/Internal Server Error to 426/Upgrade Required - Removes timezone from logger timestamp to work around issues with the Windows implimentation of strftime. Thank you breyed for testing and code. #257 - Switches integer literals to char literals to improve VCPP compatibility. diff --git a/websocketpp/impl/connection_impl.hpp b/websocketpp/impl/connection_impl.hpp index f23144f4ac..f479b8e89d 100644 --- a/websocketpp/impl/connection_impl.hpp +++ b/websocketpp/impl/connection_impl.hpp @@ -989,6 +989,8 @@ bool connection::process_handshake_request() { if (m_http_handler) { m_http_handler(m_connection_hdl); + } else { + set_status(http::status_code::upgrade_required); } return true;