Commit Graph

2108 Commits

Author SHA1 Message Date
Norman Maurer
5094bdc0cc Replace tabs with spaces 2011-11-04 19:18:28 +01:00
Norman Maurer
b82ee7341c IOStreamAddress is Serializable so add SerialVersionUID field 2011-11-03 20:33:32 +01:00
Norman Maurer
2449f03540 Remove not used SerialVersionUID fields 2011-11-03 20:32:23 +01:00
Norman Maurer
57a6d39014 Replace tabs by spaces 2011-11-03 19:19:00 +01:00
Norman Maurer
220d95fe0d Merge pull request #37 from normanmaurer/master
Safe construction via factory method
2011-11-03 07:36:20 -07:00
Norman Maurer
31b319a5dc Release the cumulation buffer after firing upstream so we don't end up
with a "leak" because of a very big ChannelBuffer. This patch is
extracted of the pull request 39. Thanks to arya for the patch
2011-11-03 11:25:24 +01:00
Norman Maurer
84ed71d42d Use safe-construction when calling fireChannelOpen() etc. This code is
based on the code of the following pull request:
https://github.com/netty/netty/pull/18

It just make it apply again to current master
2011-11-02 19:17:10 +01:00
Norman Maurer
56462ef91a Encoder and Decoder that wrap and unwraps the array of bytes. See
NETTY-357
2011-11-01 20:09:38 +01:00
Norman Maurer
bdc31e1603 Merge branch 'master' of ssh://git@github.com/netty/netty.git 2011-10-29 20:29:28 +02:00
Norman Maurer
aa5510e3b2 Remove in favor of IOStreamChannelFactory 2011-10-29 20:27:58 +02:00
Norman Maurer
a017961168 Merge pull request #22 from pfisterer/master
UPDATED: Channel(Sink) implementation for connecting to InputStream and OutputStream objects
2011-10-29 11:06:02 -07:00
Vibul Imtarnasan
c7886a5952 Merge pull request #26 from veebs/master
Web Socket HyBi 10 support
2011-10-26 17:23:13 -07:00
Veebs
e79d5720d3 Added webbit license and credits 2011-10-27 10:34:37 +11:00
Norman Maurer
a67e550207 Merge changes back from 3.2 branch which fixes a deadlock in the
SslHandler. See NETTY-443
2011-10-25 19:58:21 +02:00
Norman Maurer
2ae095f92c Fix some unused imports and warnings 2011-10-24 20:04:16 +02:00
norman
e9f97d6662 Fix formatting 2011-10-24 12:53:53 +02:00
norman
6dce4098d7 ChannelLocal nows removes Channel instances from itself once the Channel
was closed. This is configurable via a constructor parameter to allow
the
user to choose the old behavior. The default is the new one. See
NETTY-447
2011-10-24 08:25:59 +02:00
Norman Maurer
a2f4404545 Fix authors 2011-10-23 19:33:30 +02:00
Norman Maurer
0fbe65b076 Add the StreamHandler which can be used to adapt old blocking io network
code to netty. See NETTY-307
2011-10-23 19:32:00 +02:00
Trustin Lee
579ddf72fc Fix NETTY-432 HttpContentEncoder should not encode if Content-Encoding is set already and it is not 'identity'
* Replace getTargetContentEncoding() and newEncoder() with beginEncode() to avoid duplicate content detection and to provide a more flexible way to reject an encoding request
2011-10-22 22:34:03 -07:00
Trustin Lee
b944531b5e Simpler constructor form should appear first 2011-10-22 21:51:38 -07:00
Trustin Lee
114ddd9a62 Clean up FileRegion and its implementation changes
* Fix broken javadoc tags
* Remove unnecessary public modifier
* Reorder method
* Make releaseAfterTransfer immutable
2011-10-22 21:47:08 -07:00
Norman Maurer
c641f24e8f Only release FileRegion after transfer was done if its configured to do
so. The default is true in the master branch. See NETTY-440
2011-10-22 20:27:48 +02:00
Trustin Lee
0d78c0508d NETTY-439 Call channelBound/Connected from worker
* Move channelBound() to RegisterTask
* Simplify the if block in RegisterTask
2011-10-21 15:36:06 -07:00
Trustin Lee
68c9b0feeb Fix NETTY-445 Memory leak in SslHandler
* Ensure SSLEngine.closeInbound() and closeOutbound() is called on
handshake failure.
* Ensure connection is closed when a closure request is issued and
handshake failed.
2011-10-21 14:04:44 -07:00
Norman Maurer
8fb34a4717 Merge pull request #32 from normanmaurer/master
Push fixes from 3.2 branch to master
2011-10-21 09:18:42 -07:00
norman
6dd77331ed Add support for FileRegion in OIOWorker. See NETTY-441 2011-10-21 18:11:06 +02:00
norman
c6e0162887 Make sure FileRegion.releaseExternalResources() is called after the
write was done. See NETTY-440
2011-10-21 18:06:00 +02:00
norman
783e7562c7 Fire ChannelConnected events in a Worker Thread. See NETTY-439 2011-10-21 18:04:18 +02:00
norman
7328cfe58f Commit javadocs update which was previous committed to the 3.2 branch 2011-10-21 17:56:43 +02:00
Veebs
b4b3d98f37 Added more example package documentation. 2011-10-17 16:49:35 +11:00
Veebs
12d93cca29 Fixed web service client. Added more package documentation. 2011-10-17 16:49:19 +11:00
Veebs
c60b1e28cb Forgot to checkin AutoBahn echo server for testing. 2011-10-17 15:12:37 +11:00
Veebs
10b88ceaa0 AutoBahn tests 9 working. All done :-) 2011-10-17 13:58:44 +11:00
Veebs
beb56878e4 WIP. AutoBahn tests 6 working. Needed to check if final string is UTF-8 compliant. 2011-10-17 13:48:42 +11:00
Veebs
234952a516 WIP. AutoBahn tests 1-5 working. Some tests in 6 and 9 still failing. 2011-10-16 23:39:27 +11:00
Veebs
91796814eb Used codec implementation of Base64 encoding. Thanks to Steven Osborn (steve918) 2011-10-16 21:02:14 +11:00
Veebs
6f9a886a36 Test against AutoBahn WebSocket testsuite. Work in progress 2011-10-16 17:01:24 +11:00
Veebs
7057c59f3d Fixed bug in static file server timestamp comparision before sending back a 304 Not Modified. Only compare upto seconds. 2011-10-13 16:54:08 +11:00
Veebs
f8b96fe6b8 Support for FireFox websockets. They use window.MozWebSocket rather than window.WebSocket. 2011-10-13 10:17:49 +11:00
Trustin Lee
9dac941544 NETTY-438 Re-enable SSL re-negotiation by default
* Re-enabled renegotiation
* Updated Javadoc
2011-10-10 20:48:28 +09:00
Norman Maurer
509edd86f4 Add patch of NETTY-434 to the mix to fix Deadlock in
ChunkedWriteHandler. This patch was not written by me...
2011-10-10 18:00:25 +09:00
Evan Meagher
6ee3286784 Fix wording in "Summary" section. 2011-10-10 17:42:37 +09:00
Evan Meagher
79d660ca91 Fix wording in "Advanced Components for More Rapid Development" section. 2011-10-10 17:42:35 +09:00
Evan Meagher
490fc249f8 Fix wording in "Interceptor Chain Pattern" section. 2011-10-10 17:42:32 +09:00
Evan Meagher
4ea375362f Fix wording in "Universal Asynchronous I/O API" section. 2011-10-10 17:42:30 +09:00
Evan Meagher
0d6a5e004d Fix wording in "Rich Buffer Data Structure" section. 2011-10-10 17:42:26 +09:00
Veebs
33f548a8ae Added example ping/pong and closing frame. 2011-09-26 23:07:22 +10:00
Veebs
aa72c987e7 WebSocket hybi 10 support 2011-09-26 22:51:15 +10:00
Trustin Lee
9f1c394697 Fixed a compilation error in the example 2011-08-26 13:24:35 +09:00
Aaron Riekenberg
c2417c253c Cleanup failIfNecessary, fix comment. 2011-08-20 20:11:28 -05:00
Aaron Riekenberg
f474fc609a Add failImmediatelyOnTooLongFrameOption. 2011-08-20 19:58:23 -05:00
Trustin Lee
2fc18a00f6 Added a TooLongFrameException recovery test for DelimiterBasedFrameDecoder 2011-08-19 11:11:45 +09:00
Trustin Lee
f4ebcf7aed NETTY-435 LengthFieldBasedFrameDecoder fails to recover from TooLongFrameException
* Fixed a bug where TooLongFrameException is not raised immediately when the large frame was fully decoded at the first attempt
* Fixed a bug where LengthFieldBasedFrameDecoder does not reset its state completely after raising TooLongFrameException
2011-08-19 11:06:29 +09:00
Trustin Lee
83ad5fb07e Fixed a compilation error 2011-08-12 15:20:43 +09:00
Frédéric Brégier
d6ea072ccc Fix NPE when non chunked message with a large variable 2011-08-12 14:09:03 +09:00
Frédéric Brégier
6b3b3b7426 Fix of NPE when non chunked large variable is created 2011-08-12 14:08:50 +09:00
Trustin Lee
dbb2392034 NETTY-431 HashedWheelTimer's TimerTask may execute after call to Timeout.cancel()
* Replaced a volatile boolean flag and system date access with an atomic integer flag.
2011-08-12 14:04:14 +09:00
Trustin Lee
35258a5393 NETTY-430 ChunkedWriteHandler NPE 2011-08-12 13:39:55 +09:00
Trustin Lee
6156922ad6 NETTY-429 IllegalArgumentException when an HTTP server sends a '100 Continue' response to HttpContentDecoder.
* Fixed a silly coding mistake where I sent the event in the opposite direction
2011-08-03 21:25:20 +09:00
Trustin Lee
88d84c537c NETTY-428 SslHandler does not trigger an exceptionCaught event for some handshake failure cases.
* Made sure SslHandler.handshake() and SslHandler.close() trigger an exceptionCaught event when failed
2011-08-02 15:38:58 +09:00
Trustin Lee
21269fa073 SSLEngine.beginHandshake() can throw a RuntimeException. 2011-08-02 15:09:12 +09:00
Trustin Lee
dc0498d82b NETTY-408 ChunkedStream generates 1-byte chunks for wrapped input streams that does have sane implementation of available() method
* Updated JavaDoc so that users don't specify an InputStream with poor available() implementation.
2011-08-02 09:48:18 +09:00
Trustin Lee
73d1f3fe02 NETTY-384 Another deadlock in ChunkedWriteHandler
ChunkedWriteHandler.discard() do not issue write requests to trigger exceptionCaught events and to notify write futures anymore.  Instead, it triggers exceptionCaught events and notifies write futures by itself.  Therefore, no write lock is involved during discard(), avoiding the reported dead lock.

However, this is a temporary solution, and eventually Netty must introduce more robust event thread model.
2011-08-02 09:33:27 +09:00
Trustin Lee
d72b89db21 NETTY-422 Add getPipeline() to CodecEmbedder so that a user can modify the pipeline dynamically. 2011-08-02 08:47:56 +09:00
Trustin Lee
59a349031a NETTY-423 Add ChannelPipeline.getNames() 2011-08-02 08:43:10 +09:00
Trustin Lee
5c62d54c67 NETTY-420 HttpClientCodec doesn't handle HEAD requests with Transfer-Encoding: chunked responses
* Reverted back the workaround for servers that sends unnecessary zero-byte chunk in a HEAD response because it actually breaks the codec when the server that conforms to the RFC.
2011-08-02 08:34:56 +09:00
Trustin Lee
bdeed00bbb NETTY-419 ObjectEncoder/ObjectDecoder fails with NPE when deserializing the java.lang.Class instance of an interface type
* Fixed a bug where deserializing an interface class fails due to wrong lookup.
* Implemented class lookup caching
2011-08-02 08:22:02 +09:00
Trustin Lee
6f7d2f4e23 NETTY-417 client channel still open after close and wait
* Fixed a bug in SslHandler where a write attempt made after SSLEngine is closed result in unnotified future.  Fixed by respecting the case where SslEngineResult.Status == CLOSED
2011-08-02 07:47:36 +09:00
Trustin Lee
c6fa82729c NETTY-417 client channel still open after close and wait
* Fixed a race condition where NioSocketChannel's state variable is updated *after* its close future is notified
* Removed unnecessary use of ChannelFutureListeners in NioSocketChannel and AbstractChannel
2011-08-02 07:38:16 +09:00
Trustin Lee
e85996ea46 Fixed a bug where the future associated with the close request is not notified when the channel was closed already when SslHandler attempts to send a closure_notify.
This shouldn't be a problem to most applications because they usually do not specify their own future object for the close request.
2011-08-02 07:19:57 +09:00
Felix Trepanier
46c9a5f094 do not encode if empty content 2011-08-02 06:47:53 +09:00
Trustin Lee
5579a91e1d NETTY-415 ChannelFuture.setFailure() not called when exception thrown handling Channel.close()
* Made sure the ChannelFuture associated with a downstream event is marked as failure when an exception is raised before it reaches at ChannelSink.
2011-08-02 06:35:38 +09:00
pfisterer
07803b3e2c Updated version of netty-iostream channels 2011-08-01 10:07:34 +02:00
Trustin Lee
95f3af0a02 NETTY-418 isCompleteFailure() and isCompleteSuccess() are both true at the same time
* Fixed incorrect isPartialSuccess(), isPartialFailure(), isCompleteFailure() implementation
2011-08-01 06:11:14 +09:00
Trustin Lee
acb1ac84e6 NETTY-425 ChannelBuffers.compare does not handle unsigned bytes correctly
* Fixed a bug where signed comparison is made where unsigned comparison is expected
2011-08-01 04:28:08 +09:00
Trustin Lee
dfd7b0d6c3 NETTY-426 Prevent a user from reusing an upstream MessageEvent to write
something

Modified the pipeline implementations so that it rejects the attempt to
send an UpstreamMessageEvent to downstream
2011-08-01 04:16:02 +09:00
Trustin Lee
4bf26c31e9 NETTY-410 NioWorker write deadlock
Applied the patch provided by Greg Dhuse.
2011-08-01 04:00:01 +09:00
Trustin Lee
b9ef785b5b NETTY-406 ProtobufEncoder should also support Message.Builder
* Added support for Message.Builder
2011-08-01 03:46:22 +09:00
Trustin Lee
e2655f3c38 NETTY-389 java.lang.ClassCastException: org.jboss.netty.channel.FileRegion cannot be cast to org.jboss.netty.buffer.ChannelBuffer
* Updated JavaDoc to let users know that not all transports support FileRegion
* Added FIXME for future improvement
2011-08-01 03:39:06 +09:00
Trustin Lee
2acd74db83 NETTY-410 NioWorker write deadlock
Applied the patch provided by Greg Dhuse.
2011-08-01 01:32:55 +09:00
Jamie Furness
8982838ab2 Small fix to the http tunnel to prevent null pointer is attempt is made to close channel twice 2011-07-29 13:27:18 +09:00
Trustin Lee
ccc155e96f Fixed code format 2011-07-29 13:10:38 +09:00
nibin
65fc361eec * Fixed the bug in CookieEncoder if there are no cookie's set while
calling encode(). Without the fix, it ended up in calling the
exception "java.lang.StringIndexOutOfBoundsException".
* Also added test case to verify the patch

Change-Id: Ib96425e07ab50be027ade7be0748cceb6438a586
2011-07-29 13:03:55 +09:00
Trustin Lee
0062cb743c Added FIXME 2011-06-29 12:30:47 +09:00
fredericBregier
45a7692f07 Fixed NETTY-397, NETTY-398, NETTY-399, NETTY-403 2011-06-09 14:34:05 +09:00
Trustin Lee
dd1ff8d9cc Handle chunked encoding properly for non-200 responses 2011-05-26 12:11:30 +09:00
Trustin Lee
15792da167 Tabs to spaces 2011-05-11 18:11:36 +09:00
Trustin Lee
9db6bba913 NETTY-295 HTTP header getters/setters for date headers
* Added get/setDateHeader() methods that works with custom date
headers
* Removed get/setDateInMilliseconds() methods because they can be
simply represented with a chained getTime() call
* Fixed the inconsistent behavior & contract of
HttpHeaders.getContentLength() which does not throw an exception when
the header is missing or ill-formatted unless a default value is
specified
* Added clearHeaders() and removeHeader() to HttpHeaders
* Tabs to spaces
2011-05-11 18:09:49 +09:00
Rogiel Sulzbach
94cff9d041 NETTY-295 - HTTP header getters and setters for date headers
* Merged CookieDateFormat into HttpHeaderDateFormat, which can parse all
known date format variants related with HTTP
* Added HttpHeaders.get/setDate()
2011-05-11 17:02:11 +09:00
Trustin Lee
fd7b5769f7 Made IdleStateHandler @Sharable and removed unnecessary lazy
initialization in ReadTimeoutHandler
2011-05-04 17:30:09 +09:00
Trustin Lee
f22a55d6e2 NETTY-401 - NullPointerException when ReadTimeoutHandler is
concurrently initialized and destroyed

* Made ReadTimeoutHandler @Sharable
* Updated the UptimeClient again
** no static fields for global state - just reuse the handlers.
2011-05-04 17:12:11 +09:00
Trustin Lee
45a4b5b7c4 Fixed a bug in the uptime example where uptime is reset even when it
shouldn't be.
2011-05-04 16:53:57 +09:00
Bruce Mitchener
aca290096b Close bold tag. 2011-05-04 14:04:34 +09:00
Trustin Lee
e1869db913 Fixed various compiler warnings
* Missing @Override annotations
* Indirect access to a private member from inner classes
* Incorrect @see javadoc tags (should not use the @link tag)
* ..
2011-05-03 11:05:06 +09:00
iainmcgin
39a6baf380 fixing formatting for NioSocketChannelConfig, which I had incorrectly merged earlier. 2011-04-18 17:47:28 +09:00
iainmcgin
a617bd3290 Fixed formatting to conform to project standards 2011-04-18 17:47:12 +09:00
iainmcgin
f7729bc8bb Moved http tunnel implementation into org.jboss.netty.channel.socket.http package, replacing the original implementation.
Existing usage example has been deleted and should be replaced by an updated example using the new API.
2011-04-18 17:46:52 +09:00
iainmcgin
12d2c8ad2e NETTY-246: adding implementation to netty trunk for the 4.0.0 release. In order to get the tests to pass,
I had to change the surefire fork policy from "never" to "once", as it seems the classloader settings used
by the maven process were preventing jmock from mocking package private interfaces.
2011-04-18 17:44:54 +09:00
Trustin Lee
4aef19e947 Updated the initial Javadoc written by Veebs w/ a little formatting 2011-04-18 17:35:04 +09:00