mirror of https://github.com/shred/acme4j
Do not expect a response body on existing accounts
parent
e53cdee657
commit
64abe3d96e
|
@ -143,7 +143,7 @@ public class AccountBuilder {
|
|||
}
|
||||
|
||||
conn.sendSignedRequest(resourceUrl, claims, session, true);
|
||||
conn.accept(HttpURLConnection.HTTP_OK, HttpURLConnection.HTTP_CREATED);
|
||||
int resp = conn.accept(HttpURLConnection.HTTP_OK, HttpURLConnection.HTTP_CREATED);
|
||||
|
||||
URL location = conn.getLocation();
|
||||
|
||||
|
@ -151,7 +151,10 @@ public class AccountBuilder {
|
|||
if (keyIdentifier != null) {
|
||||
session.setKeyIdentifier(keyIdentifier);
|
||||
}
|
||||
|
||||
if (resp == HttpURLConnection.HTTP_CREATED) {
|
||||
account.unmarshal(conn.readJsonResponse());
|
||||
}
|
||||
return account;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue