c298230128
Motivation: Currently Netty supports a weird implementation of RFC 2965. First, this RFC has been deprecated by RFC 6265 and nobody on the internet use this format. Then, there's a confusion between client side and server side encoding and decoding. Typically, clients should only send name=value pairs. This PR introduces RFC 6265 support, but keeps on supporting RFC 2965 in the sense that old unused fields are simply ignored, and Cookie fields won't be populated. Deprecated fields are comment, commentUrl, version, discard and ports. It also provides a mechanism for safe server-client-server roundtrip, as User-Agents are not supposed to interpret cookie values but return them as-is (e.g. if Set-Cookie contained a quoted value, it should be sent back in the Cookie header in quoted form too). Also, there are performance gains to be obtained by not allocating the attribute name Strings, as we only want to match them to find which POJO field to populate. Modifications: - New RFC6265ClientCookieEncoder/Decoder and RFC6265ServerCookieEncoder/Decoder pairs that live alongside old CookieEncoder/Decoder pair to not break backward compatibility. - New Cookie.rawValue field, used for lossless server-client-server roundtrip. Result: RFC 6265 support. Clean separation of client and server side. Decoder performance gain: Benchmark Mode Samples Score Error Units parseOldClientDecoder thrpt 20 2070169,228 ± 105044,970 ops/s parseRFC6265ClientDecoder thrpt 20 2954015,476 ± 126670,633 ops/s This commit closes #3221 and #1406. |
||
---|---|---|
all | ||
buffer | ||
codec | ||
codec-dns | ||
codec-haproxy | ||
codec-http | ||
codec-memcache | ||
codec-mqtt | ||
codec-socks | ||
codec-stomp | ||
common | ||
example | ||
handler | ||
handler-proxy | ||
license | ||
microbench | ||
resolver | ||
resolver-dns | ||
tarball | ||
testsuite | ||
transport | ||
transport-native-epoll | ||
transport-rxtx | ||
transport-sctp | ||
transport-udt | ||
.fbprefs | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE.txt | ||
NOTICE.txt | ||
pom.xml | ||
README.md | ||
run-example.sh |
Netty Project
Netty is an asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.
Links
How to build
For the detailed information about building and developing Netty, please visit the developer guide. This page only gives very basic information.
You require the following to build Netty:
- Latest stable Oracle JDK 7
- Latest stable Apache Maven
- If you are on Linux, you need additional development packages installed on your system, because you'll build the native transport.
Note that this is build-time requirement. JDK 5 (for 3.x) or 6 (for 4.0+) is enough to run your Netty-based application.
Branches to look
The 'master' branch is where the development of the latest major version lives on. The development of all other versions takes place in each branch whose name is identical to <majorVersion>.<minorVersion>
. For example, the development of 3.9 and 4.0 resides in the branch '3.9' and the branch '4.0' respectively.