pull/39/merge
Justin Field 2017-10-31 21:24:54 +00:00 committed by GitHub
commit 29b5583670
1 changed files with 2 additions and 2 deletions

View File

@ -213,8 +213,8 @@ public class DefaultConnection implements Connection {
assertConnectionIsOpen(); assertConnectionIsOpen();
String contentType = conn.getHeaderField(CONTENT_TYPE_HEADER); String contentType = conn.getHeaderField(CONTENT_TYPE_HEADER);
if (!("application/json".equals(contentType) if (contentType == null || !(contentType.contains("application/json")
|| "application/problem+json".equals(contentType))) { || contentType.contains("application/problem+json"))) {
throw new AcmeProtocolException("Unexpected content type: " + contentType); throw new AcmeProtocolException("Unexpected content type: " + contentType);
} }