commit | fd6f75c980b34a8c6f569e4ee1c19b3cd9eebf14 | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Sun Jun 28 06:37:10 2020 +0200 |
committer | David Ostrovsky <david.ostrovsky@gmail.com> | Tue Jun 30 05:28:12 2020 +0000 |
tree | 3e502514cd3f30071ca6e61317c5102149a21cb8 | |
parent | a34aff962ad1455d763b80d0da019a63cd4fb315 [diff] |
Office365OAuthService: Restore Accept header in user info request In update of scribe version change: I68717ebb988 Accept header was inadvertently removed. Restore the setting of Accept header to "*/*": request.addHeader("Accept", "*/*"); Bug: Issue https://github.com/davido/gerrit-oauth-provider/issues/144 Change-Id: I224f798c7fb37e24be7f4fecfc29e11932c51286
diff --git a/src/main/java/com/googlesource/gerrit/plugins/oauth/Office365OAuthService.java b/src/main/java/com/googlesource/gerrit/plugins/oauth/Office365OAuthService.java index 0b22776..1ab9605 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/oauth/Office365OAuthService.java +++ b/src/main/java/com/googlesource/gerrit/plugins/oauth/Office365OAuthService.java
@@ -80,6 +80,7 @@ OAuthRequest request = new OAuthRequest(Verb.GET, PROTECTED_RESOURCE_URL); OAuth2AccessToken t = new OAuth2AccessToken(token.getToken(), token.getRaw()); service.signRequest(t, request); + request.addHeader("Accept", "*/*"); JsonElement userJson = null; try (Response response = service.execute(request)) {