Skip to content

Commit 681d460

Browse files
committed
Introduce TextHeaders and AsciiString
Motivation: We have quite a bit of code duplication between HTTP/1, HTTP/2, SPDY, and STOMP codec, because they all have a notion of 'headers', which is a multimap of string names and values. Modifications: - Add TextHeaders and its default implementation - Add AsciiString to replace HttpHeaderEntity - Borrowed some portion from Apache Harmony's java.lang.String. - Reimplement HttpHeaders, SpdyHeaders, and StompHeaders using TextHeaders - Add AsciiHeadersEncoder to reuse the encoding a TextHeaders - Used a dedicated encoder for HTTP headers for better performance though - Remove shortcut methods in SpdyHeaders - Replace SpdyHeaders.getStatus() with HttpResponseStatus.parseLine() Result: - Removed quite a bit of code duplication in the header implementations. - Slightly better performance thanks to improved header validation and hash code calculation
1 parent 2a2a21e commit 681d460

29 files changed

Lines changed: 3621 additions & 1356 deletions

NOTICE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ Bloch of Google, Inc:
6464
* LICENSE:
6565
* license/LICENSE.deque.txt (Public Domain)
6666

67+
This product contains a modified portion of 'Apache Harmony', an open source
68+
Java SE, which can be obtained at:
69+
70+
* LICENSE:
71+
* license/LICENSE.harmony.txt (Apache License 2.0)
72+
* HOMEPAGE:
73+
* http://archive.apache.org/dist/harmony/
74+
6775
This product contains a modified version of Roland Kuhn's ASL2
6876
AbstractNodeQueue, which is based on Dmitriy Vyukov's non-intrusive MPSC queue.
6977
It can be obtained at:
@@ -137,3 +145,4 @@ can be obtained at:
137145
* license/LICENSE.log4j.txt (Apache License 2.0)
138146
* HOMEPAGE:
139147
* http://logging.apache.org/log4j/
148+

0 commit comments

Comments
 (0)