You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@htrace.apache.org by cm...@apache.org on 2015/07/07 02:17:12 UTC
incubator-htrace git commit: HTRACE-201: htrace-web: URL-Encode query
JSON (cmccabe)
Repository: incubator-htrace
Updated Branches:
refs/heads/master c82e03c98 -> 5bbba1f6c
HTRACE-201: htrace-web: URL-Encode query JSON (cmccabe)
Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/5bbba1f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/5bbba1f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/5bbba1f6
Branch: refs/heads/master
Commit: 5bbba1f6cb3010939f8fe06b03f93000de22108c
Parents: c82e03c
Author: Colin Patrick Mccabe <cm...@cloudera.com>
Authored: Mon Jul 6 17:16:32 2015 -0700
Committer: Colin Patrick Mccabe <cm...@cloudera.com>
Committed: Mon Jul 6 17:16:32 2015 -0700
----------------------------------------------------------------------
htrace-htraced/go/src/org/apache/htrace/htraced/rest.go | 2 +-
htrace-webapp/src/main/web/app/query_results.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/5bbba1f6/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go b/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go
index ae3ba3f..ee62642 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go
+++ b/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go
@@ -207,7 +207,7 @@ func (hand *queryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
err := dec.Decode(&query)
if err != nil {
writeError(hand.lg, w, http.StatusBadRequest,
- fmt.Sprintf("Error parsing query: %s", err.Error()))
+ fmt.Sprintf("Error parsing query '%s': %s", queryString, err.Error()))
return
}
var results []*common.Span
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/5bbba1f6/htrace-webapp/src/main/web/app/query_results.js
----------------------------------------------------------------------
diff --git a/htrace-webapp/src/main/web/app/query_results.js b/htrace-webapp/src/main/web/app/query_results.js
index dc37e1e..8beaf0e 100644
--- a/htrace-webapp/src/main/web/app/query_results.js
+++ b/htrace-webapp/src/main/web/app/query_results.js
@@ -40,6 +40,6 @@ htrace.QueryResults = Backbone.Collection.extend({
},
queryString: function() {
- return JSON.stringify(this.queryJson);
+ return encodeURIComponent(JSON.stringify(this.queryJson));
}
});