Skip to content

Commit

Permalink
Fix a typo (#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesv authored Aug 8, 2017
1 parent ed4741a commit 1bd7b96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class GaeInfoServlet extends HttpServlet {
};

private final String metadata = "http://metadata.google.internal";

private TemplateEngine templateEngine;

// Use OkHttp from Square as it's quite easy to use for simple fetches.
Expand All @@ -88,7 +89,7 @@ String fetchMetadata(String key) throws IOException {
.addHeader("Metadata-Flavor", "Google")
.get()
.build();

Response response = ok.newCall(request).execute();
return response.body().string();
}
Expand Down Expand Up @@ -193,7 +194,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc

m = new TreeMap<>();
for (String k : metaPath) {
m.put(k, fetchMetadata(key));
m.put(k, fetchMetadata(k));
}
ctx.setVariable("Metadata", m.descendingMap());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc

m = new TreeMap<>();
for (String k : metaPath) {
m.put(k, fetchMetadata(key));
m.put(k, fetchMetadata(k));
}
ctx.setVariable("Metadata", m.descendingMap());

Expand Down

0 comments on commit 1bd7b96

Please sign in to comment.