From 32738273e07e56d755334adaf91795f83474a2d1 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 12 Feb 2009 04:37:48 +0000 Subject: [PATCH] Related issue: NETTY-116 HTTP issues including chunked request / response patch * Applied Dave's patch for HttpMessageDecoder --- .../handler/codec/http/HttpMessageDecoder.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java index c25c491a5a..b22bcb4245 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java @@ -81,7 +81,9 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder= 0) { - nextState = State.READ_FIXED_LENGTH_CONTENT; - } - else if (message.isChunked()) { + if (message.isChunked()) { nextState = State.READ_CHUNK_SIZE; - } - else { + } else if (message.getContentLength() >= 0) { + nextState = State.READ_FIXED_LENGTH_CONTENT; + } else { nextState = State.READ_CONTENT; } checkpoint(nextState);