diff --git a/CHANGELOG.md b/CHANGELOG.md index 32e617a7b..9f7f835a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ ### Features Added - Add `--azure-response-timeout` to allow request response timeout to be configurable, the field `timeout` is also accepted in the Azure metadata file. [#888](https://github.com/Consensys/web3signer/pull/888) +### Bugs fixed +- Upcheck was using application/json accept headers instead text/plain accept headers + ## 23.8.1 ### Bugs fixed diff --git a/acceptance-tests/src/test/java/tech/pegasys/web3signer/tests/UpcheckAcceptanceTest.java b/acceptance-tests/src/test/java/tech/pegasys/web3signer/tests/UpcheckAcceptanceTest.java index 6f2f090d7..e21ecc9b2 100644 --- a/acceptance-tests/src/test/java/tech/pegasys/web3signer/tests/UpcheckAcceptanceTest.java +++ b/acceptance-tests/src/test/java/tech/pegasys/web3signer/tests/UpcheckAcceptanceTest.java @@ -28,6 +28,7 @@ void upcheckOnCorrectPortRespondsWithOK() { given() .baseUri(signer.getUrl()) + .accept(ContentType.TEXT) .get("/upcheck") .then() .statusCode(200) diff --git a/core/src/main/java/tech/pegasys/web3signer/core/Runner.java b/core/src/main/java/tech/pegasys/web3signer/core/Runner.java index 56cb4fc86..e4e0716b2 100644 --- a/core/src/main/java/tech/pegasys/web3signer/core/Runner.java +++ b/core/src/main/java/tech/pegasys/web3signer/core/Runner.java @@ -77,6 +77,7 @@ public abstract class Runner implements Runnable, AutoCloseable { public static final String JSON = HttpHeaderValues.APPLICATION_JSON.toString(); + public static final String TEXT_PLAIN = HttpHeaderValues.TEXT_PLAIN.toString(); public static final String HEALTHCHECK_PATH = "/healthcheck"; public static final String UPCHECK_PATH = "/upcheck"; public static final String RELOAD_PATH = "/reload"; @@ -253,7 +254,7 @@ protected void addReloadHandler( private void registerUpcheckRoute(final Router router, final LogErrorHandler errorHandler) { router .route(HttpMethod.GET, UPCHECK_PATH) - .produces(JSON) + .produces(TEXT_PLAIN) .handler(new BlockingHandlerDecorator(new UpcheckHandler(), false)) .failureHandler(errorHandler); }