Related issue: NETTY-116 HTTP issues including chunked request / response patch
* Applied Dave's patch for HttpMessageDecoder
This commit is contained in:
parent
334ea6f6e6
commit
32738273e0
@ -81,7 +81,9 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
|||||||
}
|
}
|
||||||
case READ_HEADER: {
|
case READ_HEADER: {
|
||||||
readHeaders(buffer);
|
readHeaders(buffer);
|
||||||
if (message.getContentLength() == 0) {
|
if (message.isChunked()) {
|
||||||
|
checkpoint(State.READ_CHUNK_SIZE);
|
||||||
|
} else if (message.getContentLength() == 0) {
|
||||||
content = ChannelBuffers.EMPTY_BUFFER;
|
content = ChannelBuffers.EMPTY_BUFFER;
|
||||||
return reset();
|
return reset();
|
||||||
}
|
}
|
||||||
@ -186,13 +188,11 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
|||||||
}
|
}
|
||||||
|
|
||||||
State nextState;
|
State nextState;
|
||||||
if (message.getContentLength() >= 0) {
|
if (message.isChunked()) {
|
||||||
nextState = State.READ_FIXED_LENGTH_CONTENT;
|
|
||||||
}
|
|
||||||
else if (message.isChunked()) {
|
|
||||||
nextState = State.READ_CHUNK_SIZE;
|
nextState = State.READ_CHUNK_SIZE;
|
||||||
}
|
} else if (message.getContentLength() >= 0) {
|
||||||
else {
|
nextState = State.READ_FIXED_LENGTH_CONTENT;
|
||||||
|
} else {
|
||||||
nextState = State.READ_CONTENT;
|
nextState = State.READ_CONTENT;
|
||||||
}
|
}
|
||||||
checkpoint(nextState);
|
checkpoint(nextState);
|
||||||
|
Loading…
Reference in New Issue
Block a user