This commit is contained in:
@@ -743,12 +743,14 @@ public class HttpResponse extends Response<HttpContext, HttpRequest> {
|
|||||||
ByteBuffer hbuffer = createHeader();
|
ByteBuffer hbuffer = createHeader();
|
||||||
hbuffer.flip();
|
hbuffer.flip();
|
||||||
if (fileBody == null) {
|
if (fileBody == null) {
|
||||||
|
if (this.recycleListener != null) this.output = file;
|
||||||
finishFile(hbuffer, file, start, len);
|
finishFile(hbuffer, file, start, len);
|
||||||
} else {
|
} else {
|
||||||
if (start >= 0) {
|
if (start >= 0) {
|
||||||
fileBody.position((int) start);
|
fileBody.position((int) start);
|
||||||
if (len > 0) fileBody.limit((int) (fileBody.position() + len));
|
if (len > 0) fileBody.limit((int) (fileBody.position() + len));
|
||||||
}
|
}
|
||||||
|
if (this.recycleListener != null) this.output = fileBody;
|
||||||
super.finish(hbuffer, fileBody);
|
super.finish(hbuffer, fileBody);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user