Merge branch 'stable-2.12'

* stable-2.12:
  Update 2.12.4 release notes
  Fix RebaseIfNecessary strategy introducing duplicate commit
  Handle an NPE in ToolsCatalog.java
  Confirm email: Return proper error when email is used by other account
  RestApiServlet: Allow HEAD requests

Change-Id: I15414c40f1136236708cca17128bf60fa020c160
This commit is contained in:
David Pursehouse
2016-08-10 11:31:04 +09:00
7 changed files with 119 additions and 6 deletions

View File

@@ -51,6 +51,16 @@ public class HttpResponse {
return response.getStatusLine().getStatusCode();
}
public String getContentType() {
return response.getFirstHeader("X-FYI-Content-Type").getValue();
}
public boolean hasContent() {
Preconditions.checkNotNull(response,
"Response is not initialized.");
return response.getEntity() != null;
}
public String getEntityContent() throws IOException {
Preconditions.checkNotNull(response,
"Response is not initialized.");