Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

jsonp

  • Loading branch information...
commit 91c7d66686f86c39e0f08130bb7e3dfdff0d7925 1 parent 3950ebf
@dgageot authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/main/java/legacy/Inn.java
View
6 src/main/java/legacy/Inn.java
@@ -49,6 +49,12 @@ public void handle(HttpExchange exchange) throws IOException {
inn.updateQuality();
} else {
body = itemsAsJson();
+
+ String query = exchange.getRequestURI().getQuery();
+ if (null != query) {
+ String callback = query.split("[&=]")[1];
+ body = callback + "(" + body + ")";
+ }
}
byte[] response = body.getBytes();
Please sign in to comment.
Something went wrong with that request. Please try again.