Reverted back for backward compatibility

This commit is contained in:
Trustin Lee 2010-02-19 04:37:36 +00:00
parent 81d019e76a
commit 9980a25f7b

View File

@ -40,7 +40,7 @@ import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpRequest; import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.HttpResponse; import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus; import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import org.jboss.netty.handler.stream.ChunkedOioFile; import org.jboss.netty.handler.stream.ChunkedFile;
import org.jboss.netty.util.CharsetUtil; import org.jboss.netty.util.CharsetUtil;
/** /**
@ -91,7 +91,7 @@ public class HttpStaticFileServerHandler extends SimpleChannelUpstreamHandler {
ch.write(response); ch.write(response);
// Write the content. // Write the content.
ChannelFuture writeFuture = ch.write(new ChunkedOioFile(raf, 0, fileLength, 8192)); ChannelFuture writeFuture = ch.write(new ChunkedFile(raf, 0, fileLength, 8192));
// Decide whether to close the connection or not. // Decide whether to close the connection or not.
if (!isKeepAlive(request)) { if (!isKeepAlive(request)) {