Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Unified Diff: content/browser/debugger/devtools_http_handler_impl.cc

Issue 11591016: DevTools: allow query parameters and fragments in remote debugging command urls. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Lint Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/shell/shell_devtools_discovery_page.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « no previous file | content/shell/shell_devtools_discovery_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698