02f883d833
Motivation: I came across an issue when I was adding/setting headers and mistakenly used an upper case header name. When using the http2 example that ships with Netty this was not an issue. But when working with a browser that supports http2, in my case I was using Firefox Nightly, I'm guessing that it interprets the response as invalid in accordance with the specifiction https://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.2 "However, header field names MUST be converted to lowercase prior to their encoding in HTTP/2. A request or response containing uppercase header field names MUST be treated as malformed" This PR suggests converting to lowercase to be the default. Modifications: Added a no-args constructor that defaults to forcing the key/name to lowercase, and providing a second constructor to override this behaviour if desired. Result: It is now possible to specify a header like this: Http2Headers headers = new DefaultHttp2Headers(true) .status(new AsciiString("200")) .set(new AsciiString("Testing-Uppercase"), new AsciiString("some value")); And the header written to the client will then become: testing-uppercase:"some value" |
||
---|---|---|
all | ||
buffer | ||
codec | ||
codec-dns | ||
codec-haproxy | ||
codec-http | ||
codec-http2 | ||
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.