From 70409809859ac2f30a339a2ee658cb4adeb38b43 Mon Sep 17 00:00:00 2001 From: Martin Sillence Date: Fri, 28 Aug 2020 09:08:56 +0100 Subject: [PATCH] tidy up code --- .../travelaudience/nexus/proxy/BaseNexusProxyVerticle.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/travelaudience/nexus/proxy/BaseNexusProxyVerticle.java b/src/main/java/com/travelaudience/nexus/proxy/BaseNexusProxyVerticle.java index 88a3ada..9b16982 100644 --- a/src/main/java/com/travelaudience/nexus/proxy/BaseNexusProxyVerticle.java +++ b/src/main/java/com/travelaudience/nexus/proxy/BaseNexusProxyVerticle.java @@ -126,9 +126,11 @@ public final void start() throws Exception { configureRouting(router); router.route(ALL_PATHS).handler(ctx -> { - if (ctx.request().getHeader("Expect") != null && - ctx.request().getHeader("Expect").contains("100-continue")) + String expectHeader = ctx.request().getHeader("Expect"); + if (expectHeader != null && + expectHeader.contains("100-continue")) { ctx.response().writeContinue(); + } final NexusHttpProxy proxy = ((NexusHttpProxy) ctx.data().get(PROXY));