netty5/example/src/main/java/io/netty/example/http
Norman Maurer e4995be33c Use allocator when constructing ByteBufHolder sub-types or use Unpool… (#9377)
Motivation:

In many places Netty uses Unpooled.buffer(0) while should use EMPTY_BUFFER. We can't change this due to back compatibility in the constructors but can use Unpooled.EMPTY_BUFFER in some cases to ensure we not allocate at all. In others we can directly use the allocator either from the Channel / ChannelHandlerContext or the request / response.

Modification:

- Use Unpooled.EMPTY_BUFFER where possible
- Use allocator where possible

Result:

Fixes #9345 for websockets and http package
2019-07-18 10:36:03 +02:00
..
cors Use allocator when constructing ByteBufHolder sub-types or use Unpool… (#9377) 2019-07-18 10:36:03 +02:00
file Use allocator when constructing ByteBufHolder sub-types or use Unpool… (#9377) 2019-07-18 10:36:03 +02:00
helloworld Fixed HttpHelloWorldServerHandler for handling HTTP 1.0/1.1 (#9124) 2019-05-08 09:05:18 +02:00
snoop Use allocator when constructing ByteBufHolder sub-types or use Unpool… (#9377) 2019-07-18 10:36:03 +02:00
upload Carefully manage Keep-Alive/Close connection headers in all examples (#8966) 2019-04-02 21:11:39 +02:00
websocketx Use allocator when constructing ByteBufHolder sub-types or use Unpool… (#9377) 2019-07-18 10:36:03 +02:00