Index: content/browser/debugger/devtools_http_handler_impl.cc |
diff --git a/content/browser/debugger/devtools_http_handler_impl.cc b/content/browser/debugger/devtools_http_handler_impl.cc |
index 377ec1c164bb0714f4e2194ae7ca6f7f813f4818..a9feb7e2f5e6e949664007fcab0bff4014d259be 100644 |
--- a/content/browser/debugger/devtools_http_handler_impl.cc |
+++ b/content/browser/debugger/devtools_http_handler_impl.cc |
@@ -479,6 +479,15 @@ void DevToolsHttpHandlerImpl::OnJsonRequestUI( |
path = path.substr(0, jsonp_pos); |
} |
+ // Trim fragment and query |
+ size_t query_pos = path.find("?"); |
+ if (query_pos != std::string::npos) |
+ path = path.substr(0, query_pos); |
+ |
+ size_t fragment_pos = path.find("#"); |
+ if (fragment_pos != std::string::npos) |
+ path = path.substr(0, fragment_pos); |
+ |
std::string command; |
std::string target_id; |
if (!ParseJsonPath(path, &command, &target_id)) { |