Permalink
Browse files

s/callback/jsonp for clarity.

  • Loading branch information...
Robert Newson
Robert Newson committed Jul 11, 2009
1 parent 358ec1f commit 03c9f8b83b1ee6a96b25acd404f306817f634350
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/com/github/rnewson/couchdb/lucene/SearchRequest.java
@@ -68,7 +68,7 @@
private final boolean rewrite_query;
- private final String callback;
+ private final String jsonp;
private final String ifNoneMatch;
@@ -86,7 +86,7 @@ public SearchRequest(final JSONObject obj, final String viewsig) throws ParseExc
this.debug = query.optBoolean("debug", false);
this.include_docs = query.optBoolean("include_docs", false);
this.rewrite_query = query.optBoolean("rewrite", false);
- this.callback = query.optString("callback");
+ this.jsonp = query.optString("jsonp");
// Parse query.
this.q = Config.QP.parse(query.getString("q"));
@@ -255,8 +255,8 @@ public String execute(final IndexSearcher searcher) throws IOException {
headers.put("Content-Type", "text/plain");
result.put("body", escape(json.toString(2)));
} else {
- if (callback != null)
- result.put("json", String.format("%s(%s)", callback, json));
+ if (jsonp != null)
+ result.put("json", String.format("%s(%s)", jsonp, json));
else
result.put("json", json);
}

0 comments on commit 03c9f8b

Please sign in to comment.