Commit Graph

413 Commits

Author SHA1 Message Date
Veebs
1326ba54ee Replaced deprecated 'sendUnsupportedWebSocketVersionResponse()' with 'sendUnsupportedVersionResponse()' 2014-01-13 06:33:57 +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
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
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
Norman Maurer
7e6649fd66 [#1879] Correctly validate close frame 2013-10-01 07:32:23 +02:00
Norman Maurer
f70ceeab58 [#1878] Fix leak of ByteBuf when masked payload is used 2013-10-01 07:18:41 +02:00
Norman Maurer
be126395e3 [#1874] WebSocket08FrameDecoder may leak memory if channel is closed before the full frame was received 2013-09-30 20:44:55 +02:00
Arron Norwell
ce58e76e13 HttpRequestEncoder should append '/' to absolute path requests only when needed 2013-09-22 13:41:35 +02:00
Phillip Schichtel
2243970294 [#1833] Replace ; with & only in the QueryString and not the whole URI 2013-09-14 11:59:58 +02:00
Norman Maurer
36c8ac5e5c [#1819] Remove HTTP compressor and decompressor from the pipeline after websockets handshake completes 2013-09-09 11:55:58 +02:00
Norman Maurer
0065006824 [#1818] Pass through message as they are when no compression is needed 2013-09-09 11:32:37 +02:00
Norman Maurer
845a7c5753 Move encode of chunked content to an extra method, this allows for inline. Related to #1812
encode of chunked content is not the most common pattern so moving it to an extra method makes it possible to inline the rest as it is a smaller method now.
2013-09-05 10:17:43 +02:00
Derek Troy-West
12fe7b52b6 HTTP Chunk, wrong delimiter written 2013-08-27 18:11:21 +09:00
Norman Maurer
cc12e40065 [#1730] Correctly release resources in MixedFileUpload after switching from Memory to Disk 2013-08-12 07:23:00 +02:00