[##1064] Fix problem where the LastHttpContent was changed to HttpContent and so the end was never detected

This commit is contained in:
Norman Maurer 2013-02-26 07:47:30 +01:00
parent 30e7ab2f7d
commit a03bd5105a
2 changed files with 12 additions and 0 deletions

View File

@ -135,6 +135,12 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
return new Object[] { header, new DefaultHttpContent(newContent),
new DefaultLastHttpContent(lastProduct)};
}
} else {
if (header == null) {
return new Object[] { new DefaultLastHttpContent(newContent) };
} else {
return new Object[] { header, new DefaultLastHttpContent(newContent) };
}
}
}
if (header == null) {

View File

@ -187,6 +187,12 @@ public abstract class HttpContentEncoder extends MessageToMessageCodec<HttpMessa
return new Object[] { header, new DefaultHttpContent(newContent),
new DefaultLastHttpContent(lastProduct)};
}
} else {
if (header == null) {
return new Object[] { new DefaultLastHttpContent(newContent) };
} else {
return new Object[] { header, new DefaultLastHttpContent(newContent) };
}
}
}
if (header == null) {