Skip to content

Commit e88afbe

Browse files
author
Tom Seddon
committed
Fix very likely crash when URL path not handled by HTTP server.
See #480.
1 parent e72bc8a commit e88afbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/b2/HTTPMethodsHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ class HTTPMethodsHandler : public HTTPHandler {
570570
if (!path_parts.empty()) {
571571
auto it = m_request_handlers.find(path_parts[0]);
572572
if (it == m_request_handlers.end()) {
573-
server->SendResponse(request, HTTPResponse::BadRequest(request, "Unknown request type: %s", path_parts[2].c_str()));
573+
server->SendResponse(request, HTTPResponse::BadRequest(request, "Couldn't find endpoint for path: %s", request.url_path.c_str()));
574574
return;
575575
}
576576

0 commit comments

Comments
 (0)