Merge "Revert "GetCapabilities#CheckOne: Return json content type"" into stable-2.15

This commit is contained in:
David Pursehouse 2018-09-15 01:47:17 +00:00 committed by Gerrit Code Review
commit d360c38803
2 changed files with 3 additions and 6 deletions

View File

@ -1092,10 +1092,7 @@ If the user has the global capability the string `ok` is returned.
.Response
----
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json; charset=UTF-8
)]}'
ok
----

View File

@ -24,7 +24,7 @@ import com.google.gerrit.extensions.api.access.PluginPermission;
import com.google.gerrit.extensions.config.CapabilityDefinition;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.extensions.restapi.AuthException;
import com.google.gerrit.extensions.restapi.Response;
import com.google.gerrit.extensions.restapi.BinaryResult;
import com.google.gerrit.extensions.restapi.RestReadView;
import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.OptionUtil;
@ -157,8 +157,8 @@ class GetCapabilities implements RestReadView<AccountResource> {
@Singleton
static class CheckOne implements RestReadView<AccountResource.Capability> {
@Override
public Response<String> apply(Capability resource) {
return Response.ok("ok");
public BinaryResult apply(Capability resource) {
return BinaryResult.create("ok\n");
}
}
}