Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send response chunk for HEAD request #175

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ e2e-compile:

## Run system tests
e2e-test:
mvn -f system-tests/pom.xml -P$(PLATFORM) scalatest:test
mvn -f system-tests/e2e-suite/pom.xml -P$(PLATFORM) scalatest:test

## Execute a single end-to-end (scala) test
# Alternatively, it should be possible to run an individual e2e test
# with following Maven command:
#
# mvn -f system-tests/pom.xml scalatest:test -Dsuites='*ProxyPropertySpec'
# mvn -f system-tests/e2e-suite/pom.xml scalatest:test -Dsuites='*ProxyPropertySpec'
#
e2e-test-single:
mvn -f system-tests/pom.xml scalatest:test -Dsuites='${TEST}'
mvn -f system-tests/e2e-suite/pom.xml scalatest:test -Dsuites='${TEST}'

## Compile, test and create styx.zip
release: clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.handler.codec.http.HttpRequestDecoder;
import io.netty.handler.codec.http.HttpResponseEncoder;
import io.netty.handler.codec.http.HttpServerCodec;
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslHandler;
Expand Down Expand Up @@ -143,11 +142,8 @@ public void configure(Channel channel, HttpHandler httpPipeline) {
.addLast("idle-handler", new IdleStateHandler(serverConfig.requestTimeoutMillis(), 0, serverConfig.keepAliveTimeoutMillis(), MILLISECONDS))
.addLast("channel-stats", channelStatsHandler)

// Outbound
.addLast("encoder", new HttpResponseEncoder())

// Inbound
.addLast("decoder", new HttpRequestDecoder(serverConfig.maxInitialLineLength(), serverConfig.maxHeaderSize(), serverConfig.maxChunkSize(), true))
// Http Server Codec
.addLast("http-server-codec", new HttpServerCodec(serverConfig.maxInitialLineLength(), serverConfig.maxHeaderSize(), serverConfig.maxChunkSize(), true))

// idle-handler and timeout-handler must be before aggregator. Otherwise
// timeout handler cannot see the incoming HTTP chunks.
Expand Down