Norman Maurer
c70ea8250c
Add a new handler which is called SpdyHttpResponseStreamIdHandler and takes care of adding the right STREAM_ID if non is present. This makes it possible to reuse http only handlers with spdy. See #626
2012-09-23 22:46:31 +02:00
Norman Maurer
d497ca97ce
Add a new handler which is called SpdyHttpResponseStreamIdHandler and takes care of adding the right STREAM_ID if non is present. This makes it possible to reuse http only handlers with spdy. See #626
2012-09-23 22:42:50 +02:00
Norman Maurer
e6d5e25733
Fix visibility. See #626
2012-09-23 20:18:41 +02:00
Norman Maurer
6355abfde3
Add SpdyOrHttpChooser which handles the setup the ChannelPipeline for SPDY or HTTP (based on the protocol). Users can extend this to make it easier. See #626
2012-09-23 19:53:30 +02:00
Norman Maurer
03ae711b0a
Cleanup imports
2012-09-23 18:29:42 +02:00
Norman Maurer
530b72fad7
Fix IndexOutOfBoundException when using CompositeChannelBuffer and the readerIndex is at the last position and an empty array is passed to read to. See #474
2012-09-22 18:33:33 +02:00
Norman Maurer
ef0ee5f7ba
Add javadocs and cleanup. Part of #613
2012-09-21 20:25:18 +02:00
Norman Maurer
0ee4bbf8e7
Merge pull request #613 from netty/timeout_improvement
...
Use a TimerTask to trigger handling of timeouts, so we can raise the sel...
2012-09-21 08:33:42 -07:00
Lukasz Osipiuk
5362842548
Fix StackOverflowError in ChunkedWriteHandler; issue #620
2012-09-21 14:56:31 +02:00
stefanmk
3de2d06971
Update src/main/java/org/jboss/netty/handler/queue/BufferedWriteHandler.java
...
fix bug, flush variable was never reset
2012-09-19 17:50:25 +03:00
Norman Maurer
bd99d0f3e4
Allow to pass in the Timer via constructor and also stop it when the bootstrap was shutdown
2012-09-18 20:44:39 +02:00
Norman Maurer
b1f846b0d7
Use the correct delay to schedule the task and remove not necessary if check
2012-09-18 08:47:31 +02:00
Norman Maurer
68777158a4
Use a TimerTask to trigger handling of timeouts, so we can raise the select timeout again and so solve the problems with heavy context-switches
2012-09-18 08:21:53 +02:00
norman
c3af4427bb
Correctly handle exceptions when doing the handshake. See #593
2012-09-14 14:00:16 +02:00
norman
67f6513183
Cleanup
2012-09-14 13:58:04 +02:00
norman
d82b929e21
Make sure the WebSocketClientHandshaker* work also with non Heap ChannelBuffers. See #602
2012-09-14 13:55:47 +02:00
norman
1ddc19bbca
Include apiviz jar in dist. See #599
2012-09-14 09:51:06 +02:00
norman
07187bccee
Also notify ChannelFuture of PendingWrite when the SSLEngine was closed. See #601
2012-09-14 09:44:54 +02:00
norman
f1e00947a6
Make sure we only create an Iterator during processSelectedKeys(..) if there is really something key to process. This cut down unneeded garbage that needs to get handled by the GC later. See #597
2012-09-13 09:45:55 +02:00
Daniel Bevenius
aca94691da
Removing @Override annotations.
2012-09-11 12:15:08 +02:00
Daniel Bevenius
7c79d6f7b1
Fixes after feedback from Norman.
2012-09-11 11:01:35 +02:00
Daniel Bevenius
21b9dd00cd
WebSocket enhancements for 3.x
2012-09-11 08:51:15 +02:00
Norman Maurer
051b062530
ClientBoostrap#bind() Javadoc fix. See #588
2012-09-10 05:32:12 +02:00
Norman Maurer
c534864e3f
Remove @Override annotation
2012-09-10 05:21:22 +02:00
Jeff Smick
324ba369e0
Upgrade connection after completed response
...
Channel handlers above the HttpEncoder may delay the repsonse being
written to the socket. We need to wait for the response to complete
before upgrading the pipeline.
2012-09-09 08:50:31 -07:00
norman
3d441821a9
Throw an RejectedExecutionException if someone tries to register a Channel to an AbstractNioWorker that was shutdown before. Part of #582
2012-09-04 07:40:07 +02:00
Norman Maurer
3bdccc633a
Remove @deprecated use of allowShutDownOnIdle in the AbstractNioWorker and AbstractNioWorkerPool implementation. See #583
2012-09-03 21:21:24 +02:00
Norman Maurer
64b9e8fb40
Don't create Selector in a lazy fashion, just create it in the constructor. See #582
2012-09-03 21:14:00 +02:00
norman
378ea8e475
Fix a race which could lead to an exception on windows when try to release resources. See #395
2012-09-03 14:37:55 +02:00
Trustin Lee
1ac9930e39
Fix incorrect Java 7 detection
2012-09-03 16:15:33 +09:00
Trustin Lee
32c58354fa
Add SystemPropertyUtil.refresh() / Remove DebugUtilTest
...
- DebugUtilTest does not pass at all unless a new VM is not launched for
every test method
2012-09-03 16:12:02 +09:00
norman
a61403de53
Calculate the 80% the right way. See #327
2012-09-03 08:58:33 +02:00
Trustin Lee
f87bd9fd81
Split too long lines
2012-09-01 16:51:08 +09:00
Trustin Lee
79371e632c
Fix typo
2012-09-01 16:50:38 +09:00
Trustin Lee
bd3000858d
Move system property parse/access operations to SystemPropertyUtil
2012-09-01 16:49:22 +09:00
Trustin Lee
1369ba55b4
Use class names instead of fields to detect Java version
...
.. because some use patched JDK with backported fields.
2012-09-01 13:09:24 +09:00
Trustin Lee
b28244772c
Remove unused internal classes
2012-09-01 12:59:32 +09:00
Norman Maurer
4759a43c4d
Check if loglevel is enabled before log
2012-08-31 21:59:08 +02:00
Norman Maurer
45829ff721
Disable epoll bug workaround by default. It can be enabled via -Dorg.jboss.netty.epollBugWorkaround=true. It will be enabled by default later if it has proven to be stable. See #327
2012-08-31 21:55:14 +02:00
Norman Maurer
db98b9fe29
Port latest fixes for the epoll(..) workaround. See #327
2012-08-31 12:44:42 +02:00
Norman Maurer
e2464a14a4
Handle CancelledKeyException. See #327
2012-08-31 12:44:17 +02:00
Norman Maurer
fee1492c6b
Address comments of @trustin and @kimchy. See #327
2012-08-31 11:58:59 +02:00
Norman Maurer
63a234ba12
Correctly detect if the Selector.select(..) unblocks because of a manual wakup or because of a closed channel. See #327
2012-08-31 02:23:31 +02:00
Norman Maurer
883af62c92
Correctly set wakeup.compareAndSet(..) before wakeup the Selector. See #578
2012-08-31 00:36:12 +02:00
Norman Maurer
252b1414bf
Correctly convert to nanos. See #565
2012-08-30 07:25:36 +03:00
Norman Maurer
eddca7583e
Merge branch '3' into jdk_epoll_bug_workaround
...
Conflicts:
src/main/java/org/jboss/netty/channel/socket/nio/SelectorUtil.java
2012-08-29 07:48:59 +02:00
Norman Maurer
49ad538aef
Log on warn level if the selector was recreated and remove multiple calls to SelectionKey.cancel()
2012-08-29 07:43:14 +02:00
Norman Maurer
6bd6be0b09
Fix checkstyle and broken method call. Part of #569 and #572
2012-08-28 18:19:31 +02:00
Norman Maurer
0522c4ffc4
Merge pull request #572 from fredericBregier/3
...
3 - fix for issue #569
2012-08-28 09:08:22 -07:00
Frédéric Brégier
148fc841ac
Second part of fix for issue #569
...
When moving to take into account arrayOffset, it should have been taken into account also in setReadPosition and other places. Fix it now...
Also fix mismatch algorithm between SeekAheadOptimize and not SeekAheadOptimize (standard) versions.
2012-08-28 16:39:47 +03:00
Frédéric Brégier
a3cedc8b47
First part of fix for issue #569
...
When moving to take into account arrayOffset, it should have been taken into account also in setReadPosition and other places. Fix it now...
2012-08-28 16:23:35 +03:00
Norman Maurer
dc56905630
Merge pull request #545 from jaens/3-fix-spdy-compress
...
Do not write compressed SPDY frames out-of-band in another thread
2012-08-28 05:38:58 -07:00
Norman Maurer
e685e535f9
Introduce a new abstract class called OneToOneStrictEncoder which helps to ensure strict ordering. This should be used if that is needed like in the case of ZIP. See ##546
2012-08-28 13:32:38 +02:00
Norman Maurer
dc8ff7e173
Correctly convert to nanos
2012-08-28 13:04:59 +02:00
norman
039c7563cf
Cleanup
2012-08-27 11:21:05 +02:00
norman
292a186d16
Add workaround for epoll bug that cause 100% cpu usage also in the NioClientSocketPipelineSink
2012-08-27 11:12:15 +02:00
norman
db1a72c02e
Handle ClosedChannelException on re-create of the selector
2012-08-27 11:11:34 +02:00
norman
f8a99a0108
Use nanos to detect the jdk epoll bug. Also use 80% of the select timeout to detect it to be more save. Thanks to @kimchy for spot this
2012-08-27 10:20:40 +02:00
Norman Maurer
798390fc4d
Switch to System.nanoTime() to calculate block time of Selector.select(..)
2012-08-26 18:48:50 +02:00
Norman Maurer
8b4f593397
Allow to adjust timeout of Selector.select(timeout) via org.jboss.netty.selectTimeout property. See #568
2012-08-26 09:02:59 +02:00
Norman Maurer
5d07dea3b7
Use Selecor.select() to accept new Sockets to not need to schedule a timeout if not needed anyway. See #567
2012-08-26 08:46:48 +02:00
Norman Maurer
ff3f2b6361
Re-create Selector if we hit the epoll(..) jdk bug which leads to 100% cpu load. This is just a workaround but helps to recover. See #327
2012-08-25 21:51:52 +02:00
Norman Maurer
1a6e7b4be1
Merge pull request #556 from netty/jdk_bug_workaround
...
Don't rely on the return value fo Selector.select(..) as it is buggy and...
2012-08-25 11:11:05 -07:00
Cruz Julian Bishop
f34eb62104
Remove AbstractChannel.getRandom()
...
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-25 16:49:38 +10:00
Cruz Julian Bishop
93c990dd7a
Generate Channel IDs in a pseudorandom fashion
...
Requested by @psweeny in #547
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-25 13:43:02 +10:00
norman
5c6e3fe6ba
Don't rely on the return value fo Selector.select(..) as it is buggy and so can cause 100% cpu usage. See #535
2012-08-24 08:59:39 +02:00
Norman Maurer
14d01f4a8f
Move the catch block out of the connect method, which makes more sense as we need to catch it anyway in a more general scope. See See #535
2012-08-23 21:04:34 +02:00
Norman Maurer
85e55eebd8
Add a workaround for the 100% cpu usage that can happen because of an endless loop. See #535
2012-08-23 20:41:22 +02:00
norman
03c4283020
Backport fix for make SslHandler close the connection on SSLException or NotSslRecordException. This needs to get enabled via setter to keep backward compatibility. See #160
2012-08-22 07:46:49 +02:00
Trustin Lee
01ba0ff075
[ #160 ] Revert the fix for #160 for the branch '3'
...
- Fix will be part of 4.x
2012-08-22 13:44:58 +09:00
Trustin Lee
81305d87b4
[ #160 ] No response to write if server is using SslHandler and client is not
...
- Make SslHandler close the connection immediately on SSLException or
or NotSslRecordException
2012-08-22 12:16:40 +09:00
Trustin Lee
31a51b4937
[ #239 ] IdleStateHandler and ReadTimeoutHandler starts two timers
...
- Ensure initialize does not start timer twice
2012-08-21 20:13:44 +09:00
Jaen Saul
4e351f7399
Do not write compressed SPDY frames out-of-band in another thread
2012-08-20 21:39:28 +03:00
Trustin Lee
a93ada2031
[ #539 ] Potential direct memory leak in HttpContentEn/Decoder
2012-08-20 13:40:58 +09:00
Trustin Lee
bf74b16774
[ #539 ] Potential direct memory leak in HttpContentEn/Decoder
2012-08-20 13:35:12 +09:00
Trustin Lee
88c3fd306b
Typo
2012-08-20 12:18:59 +09:00
Trustin Lee
513fc4f78b
[ #539 ] Fix potential direct memory leak in HttpContentEn/Decoder
2012-08-20 12:14:38 +09:00
Trustin Lee
ebbcfbc185
Fix test failure
2012-08-20 12:04:16 +09:00
Norman Maurer
f7f0511193
Set maxAge to Integer.MIN_VALUE by default. See #534
2012-08-19 10:53:13 +02:00
Norman Maurer
af672039d7
Allow to set a negative value for maxAge of DefaultCookie. See #533
2012-08-19 10:45:55 +02:00
Trustin Lee
963b7c20ac
Merge pull request #496 from CruzBishop/static-fixes
...
Some static analysis fixes
2012-08-17 00:12:53 -07:00
Trustin Lee
195a7bb953
Use UTF-8 to encode URI - see #521
2012-08-17 11:44:21 +09:00
Trustin Lee
c509a278c3
Rename variables to reduce confusion
2012-08-17 11:33:54 +09:00
James Tyrrell
e5a7fa2c96
[ #494 ] Automatically adding chunked encoding header breaks streaming
2012-08-16 18:23:22 +10:00
Norman Maurer
3f709efcea
Merge pull request #522 from jpinner/utf8_encode_uri_3
...
Fix #521 : Encode URI using UTF-8 charset
2012-08-16 00:22:19 -07:00
norman
24f1b54c86
Only cache the localAddress if its a non wildcard address, so its possible to retrieve the 'real' adress later once the channel is fully bound/connected. See #524
2012-08-16 07:38:38 +02:00
Jeff Pinner
4f001f3246
Fix #521 : Encode URI using UTF-8 charset
2012-08-15 14:04:30 -07:00
Norman Maurer
b6264c02d9
Make sure that it continue to try to read from the socket even if the SocketTimeoutException was triggered because of the SO_TIMEOUT. See #520
2012-08-15 22:39:40 +02:00
Norman Maurer
d3d5a931d0
Set the SO_TIMEOUT on the underlying Socket so we will be able to run submitted tasks in the IO-Thread even if the read operation would block because of nothing to read. See #520
2012-08-15 22:29:03 +02:00
norman
88124d88ce
Remove synchronized blocks to optimize BufferedWriteHandler. See #519
2012-08-15 15:02:53 +02:00
Cruz Julian Bishop
8af95f0897
Fixed a typo in ObjectEchoClientHandler
...
This fixes #510 in branch 3
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-14 19:54:52 +10:00
Norman Maurer
3a3c5de76b
Merge branch '3' of github.com:netty/netty into 3
2012-08-12 10:59:04 +02:00
Norman Maurer
6d87b7629e
Fix NPE in DefaultChannelPipeline if toString() is called with an empty pipeline. See #505
2012-08-12 10:58:43 +02:00
Cruz Julian Bishop
0aebfb762b
Removes unnecessary parentheses for @trustin
...
Part of #496
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-09 19:10:17 +10:00
Cruz Julian Bishop
abc2f87f2f
Merge remote-tracking branch 'netty/3' into static-fixes
2012-08-09 19:01:05 +10:00
Trustin Lee
6d5a332667
Fix a buf in CompositeChannelBuffer.setBytes() where -1 is not returned
2012-08-09 17:50:27 +09:00
norman
eb8757f1cb
Fix bug which leads to return HttpMessageEncoder implementations null if encoding a HttpChunk which is the last one. This vilates the OneToOneEncoder contract and so leads to a missing notification of the write future. See #493
2012-08-09 08:02:27 +02:00
Cruz Julian Bishop
618ddb42e3
Replaces two manual array copies
...
This is a potential performance boost, but there shouldn't
be too much of a difference.
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-09 09:51:43 +10:00
Cruz Julian Bishop
2f88b9167c
Removes a pointless operation ( +0 )
...
I mean, seriously, this does nothing. At all. :)
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-09 09:02:14 +10:00
Cruz Julian Bishop
e685ce36fc
Removes pointless bitwise operations
...
Examples are << 0 and >>> 0
These do nothing at all, and so, should not be there in the first place
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-08-09 08:54:54 +10:00