无法使用带有SimpleChannelInboundHandler的netty下载文件<;FullHttpRequest>;

无法使用带有SimpleChannelInboundHandler的netty下载文件<;FullHttpRequest>;,netty,Netty,我从链接中下载了一个有趣的例子: 我的pom.xml中有: ...<dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.0.Beta4-SNAPSHOT</version> </dependency>...

我从链接中下载了一个有趣的例子: 我的pom.xml中有:

...<dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.0.Beta4-SNAPSHOT</version>
</dependency>...
但是,浏览器不会显示任何内容,只能永远等待

我的项目可能有什么问题?

我发现了问题。 我使用了DefaultFullHttpResponse而不是DefaultHttpResponse

21:18:29,844 DEBUG main logging.InternalLoggerFactory:71 - Using SLF4J as the default logging framework
21:18:29,854 DEBUG main channel.MultithreadEventLoopGroup:76 - -Dio.netty.eventLoopThreads: 8
21:18:29,898 DEBUG main internal.PlatformDependent0:76 - java.nio.Buffer.address: available
21:18:29,901 DEBUG main internal.PlatformDependent0:76 - sun.misc.Unsafe.theUnsafe: available
21:18:29,901 DEBUG main internal.PlatformDependent0:71 - sun.misc.Unsafe.copyMemory: available
21:18:29,902 DEBUG main internal.PlatformDependent0:76 - java.nio.Bits.unaligned: true
21:18:29,909 DEBUG main internal.PlatformDependent:76 - UID: 501
21:18:29,909 DEBUG main internal.PlatformDependent:76 - Java version: 7
21:18:29,910 DEBUG main internal.PlatformDependent:76 - -Dio.netty.noUnsafe: false
21:18:29,910 DEBUG main internal.PlatformDependent:76 - sun.misc.Unsafe: available
21:18:29,910 DEBUG main internal.PlatformDependent:76 - -Dio.netty.noJavassist: false
21:18:30,020 DEBUG main internal.PlatformDependent:71 - Javassist: available
21:18:30,021 DEBUG main internal.PlatformDependent:76 - -Dio.netty.tmpdir: /var/folders/9s/smm3crld6s33n1w2sd7x_s5w0000gn/T (java.io.tmpdir)
21:18:30,021 DEBUG main internal.PlatformDependent:76 - -Dio.netty.bitMode: 64 (sun.arch.data.model)
21:18:30,021 DEBUG main internal.PlatformDependent:76 - -Dio.netty.noPreferDirect: false
21:18:30,024 DEBUG main nio.NioEventLoop:76 - -Dio.netty.noKeySetOptimization: false
21:18:30,024 DEBUG main nio.NioEventLoop:76 - -Dio.netty.selectorAutoRebuildThreshold: 512
21:18:30,093 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.numHeapArenas: 3
21:18:30,093 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.numDirectArenas: 3
21:18:30,093 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.pageSize: 8192
21:18:30,093 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.maxOrder: 11
21:18:30,093 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.chunkSize: 16777216
21:18:30,093 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.tinyCacheSize: 512
21:18:30,094 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.smallCacheSize: 256
21:18:30,094 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.normalCacheSize: 64
21:18:30,094 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
21:18:30,094 DEBUG main buffer.PooledByteBufAllocator:76 - -Dio.netty.allocator.cacheTrimInterval: 8192
21:18:30,559 DEBUG main channel.DefaultChannelId:76 - -Dio.netty.processId: 880 (auto-detected)
21:18:30,562 DEBUG main channel.DefaultChannelId:76 - -Dio.netty.machineId: 7c:d1:c3:ff:fe:e5:ac:49 (auto-detected)
21:18:30,563 DEBUG main internal.ThreadLocalRandom:71 - -Dio.netty.initialSeedUniquifier: 0xd85b3b48568087e7 (took 17 ms)
21:18:30,582 DEBUG main buffer.ByteBufUtil:76 - -Dio.netty.allocator.type: pooled
21:18:30,582 DEBUG main buffer.ByteBufUtil:76 - -Dio.netty.threadLocalDirectBufferSize: 65536
21:18:30,584 DEBUG main util.NetUtil:86 - Loopback interface: lo0 (lo0, 0:0:0:0:0:0:0:1)
21:18:30,584 DEBUG main util.NetUtil:81 - /proc/sys/net/core/somaxconn: 128 (non-existent)
21:18:30,608  INFO nioEventLoopGroup-2-1 logging.LoggingHandler:101 - [id: 0x110396e3] REGISTERED
21:18:30,610  INFO nioEventLoopGroup-2-1 logging.LoggingHandler:101 - [id: 0x110396e3] BIND: localhost/127.0.0.1:8080
21:18:30,615  INFO nioEventLoopGroup-2-1 logging.LoggingHandler:101 - [id: 0x110396e3, /127.0.0.1:8080] ACTIVE
21:18:34,090  INFO nioEventLoopGroup-2-1 logging.LoggingHandler:101 - [id: 0x110396e3, /127.0.0.1:8080] RECEIVED: [id: 0xf40b2a37, /127.0.0.1:51085 => /127.0.0.1:8080]
21:18:34,120 DEBUG nioEventLoopGroup-3-1 util.ResourceLeakDetector:81 - -Dio.netty.leakDetectionLevel: simple
21:18:34,165 DEBUG nioEventLoopGroup-3-1 internal.JavassistTypeParameterMatcherGenerator:76 - Generated: io.netty.util.internal.__matchers__.io.netty.handler.codec.http.HttpObjectMatcher
21:18:34,168 DEBUG nioEventLoopGroup-3-1 internal.JavassistTypeParameterMatcherGenerator:76 - Generated: io.netty.util.internal.__matchers__.io.netty.handler.codec.http.FullHttpRequestMatcher
21:18:34,187 DEBUG nioEventLoopGroup-3-1 util.Recycler:76 - -Dio.netty.recycler.maxCapacity: 262144
[id: 0xf40b2a37, /127.0.0.1:51085 => /127.0.0.1:8080] Transfer complete.