Commit Graph

529 Commits

Author SHA1 Message Date
Veebs
1326ba54ee Replaced deprecated 'sendUnsupportedWebSocketVersionResponse()' with 'sendUnsupportedVersionResponse()' 2014-01-13 06:33:57 +01:00
Norman Maurer
eca5613534 Cleanup and remove get prefix of method to be more inline with our API 2014-01-11 14:21:29 +01:00
Leonardo Freitas Gomes
3ce35c710a Improves SelectedProtocol enum to avoid boilerplate on subclasses
NPN server providers return a String version of the negotiated protocol
and the getProtocolByName method allows to easily get an instance of
the SelectedProtocol enum and avoid the need for a switch statement in
each subclass to match the String against the enum value.
2014-01-11 14:21:13 +01:00
Trustin Lee
b24494abeb Fix a bug where HttpObjectDecoder produces LastHttpContent after entering BAD_MESSAGE state
- Fixes #2103
- Added LastHttpContent.EMPTY_LAST_CONTENT.toString() for athestic reasons.
2014-01-10 16:17:08 +09:00
Norman Maurer
b9bbded84e [#2090] Correctly format DefaultHttpRequest#toString() 2014-01-06 17:34:46 +01:00
Norman Maurer
7d90c5b756 [#2088] Introduce sendUnsupportedVersionResponse(...) methods which allows to use the ChannelFuture/ChannelPromise to get notified once the response was send.
Also mark the old method as deprecated.
2014-01-03 11:11:08 +01:00
Trustin Lee
dd49b1cfac Use LinkedHashSet for HttpHeaders.names() and add Javadoc about the performance of names() and entries() 2013-12-22 19:17:27 +09:00
Norman Maurer
0052d83db1 Limit the access of the HttpHeaders for performance reasons 2013-12-18 15:13:11 +01:00
Trustin Lee
e9f09ea9f5 Stop decoding after protocol upgrade / Do not use singleDecode option 2013-12-18 15:13:04 +01:00
Trustin Lee
0f76b3c357 Remove unnecessary code from HttpObjectDecoder and re-enable all HTTP tests
- Since Netty 4, HTTP decoder does not generate a full message at all.  Therefore, there's no need to keep separate states for the content smaller than maxChunkSize.
- maxChunkSize must be greater than 0. Setting it to 0 should not disable chunked encoding. We have a dedicated flag for that.
- Uncommented the tests that were commented out for an unknown reason, with some fixes.
- Added more tests for HTTP decoder.
- Removed the Ignore annotation on some tests.
2013-12-18 15:12:55 +01:00
Trustin Lee
3444c06654 Fix a bug where HttpObjectAggregator fails to send a '100 Continue' response
- Fixes #1742
2013-12-16 21:44:44 +09:00
Jeff Pinner
c3891a3df4 SPDY: add SETTINGS_MINOR_VERSION 2013-12-16 14:21:07 +09:00
Jeff Pinner
6447777ac2 SPDY: code cleanup 2013-12-16 14:19:33 +09:00
Jeff Pinner
db59b38db3 SPDY: remove SPDY/2 support 2013-12-16 14:18:01 +09:00
Trustin Lee
49587791b7 Fix a compilation error 2013-12-16 14:17:47 +09:00
Bill Gallagher
c1704039f0 bring back entries() 2013-12-16 14:13:43 +09:00
Bill Gallagher
e6eb7fa466 minor gc optimization: better DefaultSpdyHeaders.iterator() 2013-12-16 14:13:23 +09:00
Jeff Pinner
39ae2dd3f1 SPDY: add SPDY/3.1 support
- with Michael Schore <mschore@twitter.com>
2013-12-16 14:11:52 +09:00
Norman Maurer
e965318398 Optimize encoding of websocket frames by merge if possible 2013-12-13 11:44:22 +01:00
Trustin Lee
3812b897e6 Fix buffer leak in AbstractMemoryHttpData 2013-12-07 11:14:08 +09:00
Norman Maurer
b3d8c81557 Fix all leaks reported during tests
- One notable leak is from WebSocketFrameAggregator
- All other leaks are from tests
2013-12-07 00:44:56 +09:00
Norman Maurer
05c10fae05 Replace usage of StringBuilder by AppendableCharSequence for performance reasons 2013-12-03 12:04:07 +01:00
Norman Maurer
818bc602ee Remove the use of ThreadLocal for performance reasons 2013-11-29 17:43:12 +01:00
Norman Maurer
3dace666a3 Merge buffers for performance reasons if possible when encode http requests/responses. 2013-11-28 13:48:00 +01:00
Norman Maurer
7f57c5ed05 Backport HTTP encoding / decoding optimizations which were introduced by #2007.
The backport is partly done to keep backward compatibility
2013-11-28 10:46:27 +01:00
Trustin Lee
313365cd5c Fix NPE raised by HttpHeaders.equalsIgnoreCases() when one of its arguments is null 2013-11-28 15:51:48 +09:00
Norman Maurer
8753412d07 [#2006] Correctly handle HttpMessage / HttpContent implementations 2013-11-26 10:57:24 +01:00
Norman Maurer
04e8d25792 [#2005] Allow to use HttpContentDecompressor in strict mode 2013-11-26 08:22:01 +01:00
Norman Maurer
fd4435e6e3 Respect validateHeaders when duplicate/copy the response/request 2013-11-26 08:09:14 +01:00
Norman Maurer
80f72a8270 Optimize DefaultHttpHeaders.contains(...) 2013-11-24 14:40:25 +01:00
Norman Maurer
da84afe9cc Optimize check for equals header name and value 2013-11-24 14:35:49 +01:00
Norman Maurer
5de4b23c7a [#1982] Limit the usage of ThreadLocal.get() for performance reasons 2013-11-14 09:33:40 +01:00
Norman Maurer
8bfbf77b58 Also allow to disable header validation via HttpServerCodec and HttpClientCodec. Related to [#1981] 2013-11-14 08:19:49 +01:00
Norman Maurer
c4130e0cf7 Allow to disable validation of HTTP headers which shows a 5k perf improvement here when disabled 2013-11-14 07:45:03 +01:00
Trustin Lee
6cd9045b96 Fix checkstyle 2013-11-04 19:49:19 +09:00
Trustin Lee
54db9ec725 Use StringUtil.simpleClassName(..) instead of Class.getSimpleName() where necessary
- Class.getSimpleName() doesn't render anonymous classes very well
- + some minor cleanup
2013-11-04 19:46:15 +09:00
Trustin Lee
285f51d5ba Instead of complicated capacity estimation, just use thread local buffers.
Fixes #1951
2013-11-02 19:22:44 +09:00
Trustin Lee
40c9de1b74 Create StringBuilder with saner initial capacity when encoding a Cookie
Fixes #1951
2013-11-02 19:17:01 +09:00
Trustin Lee
1c2352e6a0 Replace constructor calls on UniqueName and its subtypes with valueOf() wherever possible 2013-10-25 20:58:53 +09:00
Trustin Lee
926479e904 Make all mutable fields in WebSocketClientHandshaker volatile
- Fixes #1945
2013-10-24 17:39:50 +09:00
Norman Maurer
35cd13d10e [#1933] Correctly add the wsencoder before the httpencoder as the httpencoder also handle ByteBuf 2013-10-19 20:54:18 +02:00
Norman Maurer
45524ea43e More robust pipeline manipulation while upgrading to WebSocket
- This commit allows a user to write its first web socket frame right after calling WebSocketServerHandshaker.handshake() rather than adding a listener to the future it returns.
- Should fix #1933
2013-10-18 18:22:20 +02:00
Trustin Lee
14e3c2c0d4 Make sure HttpVersion checks if the version string is not empty
.. which was the behavior in 3.x.
2013-10-17 20:26:51 +09:00
Norman Maurer
812b0d11c2 No need to slice before copy. Part of #1848 2013-10-12 20:04:33 +02:00
Michael Grove
951dcc6c10 copy all sliced buffers, fixes #1848 2013-10-12 19:54:43 +02:00
Bill Gallagher
b5f5175338 minor gc optimization: better DefaultSpdyHeaders.iterator() 2013-10-12 10:05:31 +02:00
Norman Maurer
ff6a06a9be Add HttpHeaders.contains(name, value, ...) to save creation of LinkedList for simple checks 2013-10-11 21:39:53 +02:00
Bill Gallagher
1542b36e80 minor gc optimization: better DefaultHttpHeaders.iterator() 2013-10-11 20:44:07 +02:00
Norman Maurer
5317995a13 [#1881] Use correct field name in NullPointerException 2013-10-04 09:54:41 +02:00
Norman Maurer
ee192f0321 [#1880] Use ByteBufAllocator when read bytes into new chunks 2013-10-01 10:10:43 +02:00