Commit Graph

2757 Commits

Author SHA1 Message Date
Shairon Toledo
9650cda163 Fix for filename enconding
- Fixes #992
2013-01-29 15:51:17 +09:00
Michael Morello
923e69251b NioServerBossPool : init() must be called after super(...) otherwise thread name determiner is not used 2013-01-25 11:13:51 +01:00
Norman Maurer
269fd20843 [#937] Add also a ServerBootstrap.bindAsync() method and correct the javadocs 2013-01-16 09:39:12 +01:00
Norman Maurer
bc64c18827 [#937] Add test for ServerBootstrap.bindAsync(..) 2013-01-16 08:27:44 +01:00
Norman Maurer
cb3c74ea2f [#763] Handle PingWebSocketFrames in the client example 2013-01-16 08:09:34 +01:00
Jeff Pinner
3b1ebf7f10 SPDY: fix improper use of SYNC_FLUSH in SpdyHeaderBlockZlibCompressor 2013-01-16 08:05:12 +01:00
Norman Maurer
fe09ad36e2 [#937] Allow to bind in an async fashion via the new method ServerBootstrap.bindAsync(..) 2013-01-15 15:50:38 +01:00
Norman Maurer
fc5606e034 Make compatible with java5 2013-01-15 09:24:21 +01:00
alexey
9fcd31a4f4 backport socks codec to 3 branch 2013-01-15 09:16:08 +01:00
Aaron
ca7702f38c [#915] [#923] Expanded scope of the handshake locks in SSLHandler to avoid possible negotiation after the first SSLEngine wrap 2013-01-14 21:12:23 +01:00
Jeff Pinner
13b3290fd1 SPDY: fix regression in SpdyFrameDecoder.decodeHeaderBlock() 2013-01-14 10:44:12 -08:00
Jeff Pinner
392f4a9049 SPDY: allow empty header values in SPDY/3 2013-01-14 22:46:35 +09:00
Glynn Morrison
16fc1731b9 Chrome requires the :version: header in SPDY_SESSION_PUSHED_SYN_STREAM frames otherwise it issues a HTTP_TRANSACTION_SPDY_SEND_REQUEST_HEADERS and a SPDY_STREAM_ERROR saying "HEADERS incomplete headers, but pending data frames." 2013-01-14 22:34:07 +09:00
Norman Maurer
c5dbf405d1 [#921] Fix NPE which can be thrown on bad-timing when using WebSocketClientHandshaker07 2013-01-10 11:13:26 +01:00
Trustin Lee
560ccc019c Fix various inspection warnings 2013-01-10 15:24:49 +09:00
Norman Maurer
0365b25e5b [#906] Fix VirtualExecutorService.awaitTermination(..) to behave like specified in the javadocs 2013-01-08 13:49:44 +01:00
Norman Maurer
1bdc13451f [#890] ImmediateExecutor should be public 2013-01-04 11:37:30 +01:00
Norman Maurer
d183c1b24a [#769] Do not set 'Content-Encoding' if the target encoding is 'identity' 2013-01-02 16:16:49 +01:00
Norman Maurer
725a54d07a [#865] Fix regression in SslHandler which can cause to miss a wrap() call 2012-12-29 08:37:39 +01:00
Piotr Bartosiewicz
6274abd134 [#845] Enable PUT of files above 2GB 2012-12-24 21:14:51 +01:00
Norman Maurer
badbc88032 List draft-ietf-hybi-thewebsocketprotocol-07 as supported websocket version 2012-12-20 06:49:43 +01:00
Norman Maurer
c59a4738ef [#832] Add javadocs which explains how to workaround the problem 2012-12-19 15:11:21 +01:00
Norman Maurer
795d336bab [#751] Backport WebSocket 07 support 2012-12-19 12:29:20 +01:00
Trustin Lee
f0a5774fed Do not use slice() to read content of an HTTP message
This fixes the bug introduced while fixing #412
2012-12-19 18:38:03 +09:00
Norman Maurer
f13f3d1ed3 [#799] [#835] Allow to set a timeout for the SslHandler.handshake(), after which it will fail 2012-12-19 10:04:03 +01:00
Norman Maurer
dcd0723a9d [#829] Add test that can be used to verify the fix, this failed before. 2012-12-17 13:53:00 +01:00
Norman Maurer
e784a773f7 [#829] Fix a race in SslHandler which could lead to all types of SSLExceptions, including handshake() failures 2012-12-17 13:52:02 +01:00
Trustin Lee
44938973b4 Fix compilation warnings 2012-12-14 18:35:39 +09:00
Norman Maurer
7278664c0b [#807] SslHandler.handshake() need to respect ChannelFuture of wrapNonAppData(...) 2012-12-13 16:49:47 +01:00
Arya Asemanfar
6f6e1693cf fix containsValue to take snapshot of table and use Arrays.fill for clearing out oldTable 2012-12-12 09:36:22 -08:00
Arya Asemanfar
9dd0756d7a clear out the hash table after resizing, and check for table modification in reads 2012-12-08 11:04:10 +01:00
Norman Maurer
7aa2cfad65 [#775] Rework closing logic of Worker/Boss
Added a shutdown() method on ChannelFactory, Boss, Worker, BossPool, WorkerPool and Bootstrap which can be used to just shutdown the instance and so release all internal created resources. This method is also called when releaseExternalResources() which will also release external created resources like Executors.

This commit also fixes the problem that the Worker/Boss Thread will never be released if you use an Executor (no ExecutorService).
2012-12-05 13:47:10 +01:00
Trustin Lee
95684d92eb [#789] Allow a user to trigger the epoll bug workaround
This commit adds rebuildSelector(s) method to Boss, BossPool, Worker, and WorkerPool.  A user can call rebuildSelector(s) method to initiate the workaround for the infamous epoll 100% CPU bug in Linux based on his or her observations rather than potentially incorrect automatic initiation of the workaround.

Previously, setInterestOps() were executed by a caller thread, which made re-registration of SelectionKeys unsafe.  This commit also ensures setInterestOps() is always executed by an I/O thread.  With this change, we don't need NioProviderMetadata anymore.
2012-12-04 18:24:47 +01:00
Trustin Lee
7f1b38262c Remove unnecessary empty lines 2012-12-03 20:51:25 +09:00
Norman Maurer
a52c5befe3 [786] Fix possible corruption of first WebSocketFrame caused by WebSocketServerHandshaker* 2012-12-02 19:59:41 +01:00
Norman Maurer
15c67f87ff [#776] Introduce the possiblilty to specify a BossPool when construct ChannelFactory instances.
* Beside this allow to set a ThreadNameDeterminer per BossPool and WorkerPool. This allows to have different determiner instances in the same JVM.
This fixes #771.
* With the possiblity to share BossPools it is even easier to limit the Thread counts even if you need to create many ChannelFactory instances. So this gives a lot of flexibility.
2012-11-29 20:06:32 +01:00
Norman Maurer
1e515b092c fixing type on event/send argument 2012-11-27 19:37:28 +01:00
Trustin Lee
e7fd2afc25 Remove redundant exception message 2012-11-26 15:33:57 +09:00
Trustin Lee
0a1c5bef21 Make CompatibleMarshallingDecoder discard the inbound buffer once TooLongFrameException is raised
(See #768)

Once too long object is received, CompatibleMarshallingDecoder has to
discard all input from now on, just like MarshallingDecoder does.
Otherwise, the decoder will raise more exceptions because the decoder
has no idea anymore where the object starts.

Before this fix, SerialThreadLocalCompatibleMarshallingDecoderTest
logged many additional exceptions raised by the decoder after test is
finished.
2012-11-26 14:44:03 +09:00
Norman Maurer
ef481bfedb [#766] Rename method to extractFrame(..), no need to make it more complicated in 3 2012-11-25 17:53:56 +01:00
Norman Maurer
bc1ef572b9 [#766] Add extract(..) method to FrameDecoder to allow easier optimizations in sub-classes and still make it consistent 2012-11-25 17:33:38 +01:00
Daniel Bevenius
ed65dffddf Adding WebSocket Example using WebSocketServerProtocolHandler. 2012-11-25 14:28:52 +01:00
Benoit Sigoure
d4155ad518 Add a line-based frame decoder with good performance.
Using DelimiterBasedFrameDecoder with Delimiters.lineDelimiter() has
quadratic performance in the size of the input buffer.  Needless to
say, the performance degrades pretty quickly as the size of the buffer
increases.  Larger MTUs or loopback connections can make it so bad that
it appears that the code is "busy waiting", when in fact it's spending
almost 100% of the CPU time in DelimiterBasedFrameDecoder.indexOf().

Add a new LineBasedFrameDecoder that decodes line-delimited frames
in O(n) instead of DelimiterBasedFrameDecoder's O(n^2) implementation.
In OpenTSDB's telnet-style protocol decoder this resulted in throughput
increases of an order of magnitude.

Change DelimiterBasedFrameDecoder to automatically detect when the
frames are delimited by line endings, and automatically switch to
using LineBasedFrameDecoder under the hood.  This means that all Netty
applications out there that using the combo DelimiterBasedFrameDecoder
with Delimiters.lineDelimiter() will automatically benefit from the
better performance of LineBasedFrameDecoder, without requiring a code
change.
2012-11-24 20:51:45 +01:00
Norman Maurer
26943f189c [761] Fix possible NPE in cleanupWriteBuffer() when closing Channel 2012-11-23 06:47:10 +01:00
Jaen Saul
0cb145ed68 SPDY: fix header block values truncation in decompression 2012-11-20 20:25:37 +02:00
Norman Maurer
5ec179c33c [#723] Use ExecutorServer.shutdown() in ExecutorHandler when terminate it. This way not tasks are lost 2012-11-17 19:47:06 +01:00
Jeff Pinner
8e3ec00e33 SPDY: fixed session status (internal error misdocumented) 2012-11-17 19:27:07 +01:00
Norman Maurer
3e7c8341a6 [#734] Make sure that ChannelFuture is also notified when write an unsupported message to the channel and also prevent a NPE which could be raised because of the bug before 2012-11-16 22:42:52 +01:00
Norman Maurer
d15f9eda08 [#740] Fix WebSocketClientHandshaker00.finishHandshake() validations 2012-11-15 13:00:44 +01:00
Norman Maurer
1e8ed50482 [#737] WebSocketClientHandshaker00 should set Content-Length header do workaround problem with proxy 2012-11-14 10:12:42 +01:00