diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java index 0cc3d30eda..0c8bb4bb40 100644 --- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java +++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java @@ -47,10 +47,10 @@ public void invoke(ClientRequest request, HttpRequest extensionParam) { final boolean allowStreaming = length > expectContinueSizeThreshold || entityProcessing == RequestEntityProcessing.CHUNKED; - if (extensionParam.protocolVersion().equals(HttpVersion.HTTP_1_1) - && (!Boolean.TRUE.equals(expectContinueActivated) + if (!extensionParam.protocolVersion().equals(HttpVersion.HTTP_1_1) + || !Boolean.TRUE.equals(expectContinueActivated) || !request.hasEntity() - || !allowStreaming)) { + || !allowStreaming) { return; } extensionParam.headers().add(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE);