Skip to content

Commit bf523c7

Browse files
author
Behnam Mozafari
committed
Addressed review feedback: used HttpHeaders.CONTENT_TYPE
1 parent 717f4b3 commit bf523c7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/uid2/core/vertx/CoreVerticle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private void handleGetConfig(RoutingContext rc) {
212212
String fileContent = ar.result().toString();
213213
JsonObject configJson = new JsonObject(fileContent);
214214
rc.response()
215-
.putHeader("content-type", "application/json")
215+
.putHeader(HttpHeaders.CONTENT_TYPE, "application/json")
216216
.end(configJson.encodePrettily());
217217
} else {
218218
rc.response()

src/test/java/com/uid2/core/vertx/TestCoreVerticle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.uid2.shared.store.reader.RotatingCloudEncryptionKeyProvider;
1818
import io.vertx.core.*;
1919
import io.vertx.core.buffer.Buffer;
20+
import io.vertx.core.http.HttpHeaders;
2021
import io.vertx.core.json.JsonArray;
2122
import io.vertx.core.json.JsonObject;
2223
import io.vertx.ext.web.client.HttpResponse;
@@ -889,7 +890,7 @@ void getConfigSuccess(Vertx vertx, VertxTestContext testContext) throws Exceptio
889890
System.out.println("Response: " + response.bodyAsString());
890891
// Validate response
891892
assertEquals(200, response.statusCode());
892-
assertEquals("application/json", response.getHeader("content-type"));
893+
assertEquals("application/json", response.getHeader(HttpHeaders.CONTENT_TYPE));
893894
JsonObject actualConfig = new JsonObject(response.bodyAsString());
894895
assertEquals(expectedConfig, actualConfig);
895896
testContext.completeNow();

0 commit comments

Comments
 (0)