Commit Graph

556 Commits

Author SHA1 Message Date
Simone Bordet d4f522b9d4 Corrected SslConnection to clear the _inbound buffer if the input is shutdown
and the unwrapping yielded a buffer underflow.

This is important because isInputShutdown() returns true only if the _inbound
buffer is empty, and the check for the input shutdown is made in several places.

Added also more SSL bytes tests that send RST in order to test cases that throw
exceptions.
2012-01-11 22:22:42 +01:00
Simone Bordet 5c059550a8 Improved logging. 2012-01-11 22:18:24 +01:00
Jan Bartel 691efcc7ca Merge remote-tracking branch 'origin/master' into jetty-8 2012-01-11 16:35:57 +11:00
Simone Bordet bb0a320102 Improved toString(). 2012-01-10 17:41:32 +01:00
Greg Wilkins 8fcc22df32 368240: Improved handling of dispatch failure 2012-01-11 01:12:36 +11:00
Greg Wilkins a7783ae568 368240: Fixed the start of dependent beans 2012-01-11 01:04:01 +11:00
Greg Wilkins 968a2ac95b 368240: Added concept of join to AggregateLifeCycle. Used by HttpClient and AbstractConnector 2012-01-11 00:09:34 +11:00
Jan Bartel 1fbec51c8a Merge remote-tracking branch 'origin/master' into jetty-8 2012-01-10 16:08:59 +11:00
Jesse McConnell 0fa4fa9b23 clean up some warnings from maven 2012-01-09 14:57:21 -06:00
Greg Wilkins bb2d782f3e Merge remote-tracking branch 'origin/master' into jetty-8 2011-12-23 02:09:20 +11:00
Greg Wilkins b4ab738ca9 364921 Made test less time sensitive for ssl 2011-12-23 00:57:26 +11:00
Greg Wilkins b36425b7aa Merge remote-tracking branch 'origin/master' into jetty-8
Conflicts:
	jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
2011-12-22 09:52:11 +11:00
Greg Wilkins 7b2a0cb502 364921 removed debug 2011-12-22 00:53:33 +11:00
Greg Wilkins b99e03c465 364921 moved setCheckForIdle handling to AsyncHttpConnection 2011-12-22 00:48:25 +11:00
Jan Bartel c3643d9937 Merge remote-tracking branch 'origin/master' into jetty-8 2011-12-21 12:37:23 +11:00
Greg Wilkins a606529710 364921 SslConnection does real close on idle if already oshut 2011-12-21 10:06:55 +11:00
Simone Bordet ecb88f836e 367175 - SSL 100% CPU spin in case of blocked write and RST. 2011-12-20 13:25:55 +01:00
Greg Wilkins c5c6377e26 some IOTests to show that clients can write after server close??? 2011-12-20 09:21:18 +11:00
Greg Wilkins b027779830 364638 check for idle after shutdown output 2011-12-19 16:53:14 +11:00
Simone Bordet 3e05c1e59d Merged from origin/master. 2011-12-16 21:30:45 +01:00
Simone Bordet ed1ee997b4 Fixed missing call to handle() in case of non-dispatched reads.
While performing a SSL write triggered by an application thread that is not
dispatched by the NIO layer, process() may read and decrypt bytes that will
be kept in the _unwrapBuf buffer.
However, the application needs to parse these bytes, but parsing is normally
performed only from handle() by a thread dispatched by the NIO layer.
The fix is to detect if there are unparsed bytes at the end of process(), and if
so, call asyncDispatch() to eventually call handle() to parse those bytes.
2011-12-16 20:58:18 +01:00
Simone Bordet a88e2c5ebb Updated toString() implementations. 2011-12-16 20:53:15 +01:00
Jan Bartel e515b5b7dc JETTY-1460 suppress PrintWriter exceptions 2011-12-15 20:19:04 +11:00
Greg Wilkins bc48eb1f5b 366730 pass the time idle to onIdleExpire 2011-12-14 11:41:32 -08:00
Simone Bordet fa0e06d186 Removed guard whether the channel is closed in checkIdleTimestamp().
This follows commit ff29a1cc51 for JETTY-1322.
The reason to remove the guard is that the channel may be closed multiple times, and if for any reason
a check to the idle timestamp triggers, then the idle callback is invoked, but it's not really idle: it is
already closed.
When used with SSL, this causes a truncation attack exception thrown by SSLEngine, because the idle
callback causes a shutdown of the SSLEngine without having received a SSL close alert.
2011-12-13 11:14:25 +01:00
Simone Bordet 416b6a8a15 Added guard against multiple closes: if the endPoint is already closed, skip updating the SSLEngine and/or the endPoint. 2011-12-12 16:57:14 +01:00
Greg Wilkins de005c68fd Revert "Merge branch 'release-8'"
This reverts commit 9e72457941, reversing
changes made to df12605f0e.
2011-11-30 16:27:30 +11:00
Greg Wilkins 631b0ba1b6 [maven-release-plugin] prepare for next development iteration 2011-11-30 13:16:54 +11:00
Greg Wilkins 9d3745f999 [maven-release-plugin] prepare release jetty-8.1.0.RC0 2011-11-30 13:16:41 +11:00
Greg Wilkins dcf7ef2335 fixes after merge 2011-11-29 10:15:20 +11:00
Greg Wilkins 55d5020980 Merge remote-tracking branch 'origin/master' into jetty-8
Conflicts:
	VERSION.txt
	jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java
	jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
	jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
2011-11-29 09:06:25 +11:00
Greg Wilkins 4ce72ee549 improved test timing 2011-11-29 08:36:56 +11:00
Greg Wilkins b969de1788 organized imports 2011-11-28 15:32:14 +11:00
Greg Wilkins 06b66f31f5 test NIO assumptions 2011-11-28 11:54:08 +11:00
Greg Wilkins ddce35a2e6 364638 SCEP does idle timestamp checking. New setCheckForIdle method controls onIdleExpired callback.
364921 a second onIdleExpired callback will result in close rather than a shutdown output.
2011-11-28 11:51:01 +11:00
Simone Bordet 8e913fe7c0 Fixed bug in AsyncEndPoint.hasProgressed() handling: the progressing status
must be remembered until a call to hasProgressed() is made.
Additional code cleanups.
2011-11-24 20:58:59 +01:00
Simone Bordet c6103f2d53 Removed usages of ThreadDeath. 2011-11-24 20:39:04 +01:00
Simone Bordet 59c111bde1 Rewritten toString() methods using String.format(). 2011-11-24 15:20:06 +01:00
Simone Bordet 8f1fff78c0 Improved dumping capabilities of HttpClient, and rewritten toString() methods using String.format(). 2011-11-24 10:16:19 +01:00
Greg Wilkins aa0b71f928 Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project 2011-11-22 13:16:40 +11:00
Greg Wilkins 6cb2d13abd Client idle connection uses onIdleExpired rather than close 2011-11-22 12:57:32 +11:00
Simone Bordet e1d05939b8 Merge remote-tracking branch 'origin/master' 2011-11-21 23:47:03 +01:00
Simone Bordet 83f2c1b55c Integrated behavior of is[In|Out]putShutdown() with volatile flag and previous implementation. 2011-11-21 23:31:09 +01:00
Simone Bordet e27c5a9306 Normalized behavior of shutdown[In|Out]put() methods and is[In|Out]putShutdown(), relying on a volatile flag. 2011-11-21 21:39:47 +01:00
Greg Wilkins d55477388b more debug in tests 2011-11-22 00:12:56 +11:00
Jan Bartel 0e9449ac85 Merge remote-tracking branch 'origin/master' into jetty-8 2011-11-21 18:18:09 +11:00
Greg Wilkins a00f790bc5 fixed close on early shutdown 2011-11-21 10:25:26 +11:00
Greg Wilkins dbd97a52ae flush ssl shutdownoutput 2011-11-19 09:48:47 +11:00
Simone Bordet 712d250d3e Merge remote-tracking branch 'origin/master' 2011-11-18 12:45:05 +01:00
Greg Wilkins defc729d69 close idle SSL with shutdown 2011-11-18 15:33:05 +11:00
Greg Wilkins f70ed3ac21 prevent spin by write blocked from non dispatched thread 2011-11-18 09:19:52 +11:00
Simone Bordet 324f2049f3 Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project 2011-11-17 12:40:56 +01:00
Simone Bordet d1592cf5b5 Added more SSL tests to detect spinning conditions. 2011-11-17 12:40:32 +01:00
Greg Wilkins 584bbd4bce improved siege 2011-11-17 16:31:22 +11:00
Jan Bartel b8b5df27d6 Merge remote-tracking branch 'origin/master' into jetty-8 2011-11-17 11:03:07 +11:00
Jan Bartel 127a5af8d7 Merge remote-tracking branch 'origin/master' into jetty-8 2011-11-17 10:59:54 +11:00
Greg Wilkins e48570bd5e SSL progress measured by process not inbound 2011-11-17 07:14:40 +11:00
Greg Wilkins e322a28753 made test timing less sensitive to Virtual machine quantums 2011-11-16 17:54:35 +11:00
Greg Wilkins ff656d4a17 less stressful test 2011-11-16 17:08:38 +11:00
Greg Wilkins de42eafdcd cleanup 2011-11-16 14:01:50 +11:00
Greg Wilkins a9d33bb561 maintain own ishut status 2011-11-16 13:15:36 +11:00
Greg Wilkins 9ac9a1d687 maintain own ishut status 2011-11-16 13:12:19 +11:00
Greg Wilkins a8173e3d12 test clean ups 2011-11-16 12:54:14 +11:00
Greg Wilkins 0fdc5c5d2e test clean ups 2011-11-16 12:26:28 +11:00
Greg Wilkins e3bdf43112 clean ups 2011-11-16 10:46:06 +11:00
Greg Wilkins 52275e27b4 reverted possible fix for OS that does not handle half close well 2011-11-16 10:22:49 +11:00
Greg Wilkins 533210298d possible fix for OS that does not handle half close well 2011-11-16 09:58:45 +11:00
Greg Wilkins 400bdd1e9a 349110 fixed bypass chunk handling 2011-11-16 08:36:42 +11:00
Greg Wilkins edbea0c613 363757 partial fix 2011-11-15 23:19:46 +11:00
Greg Wilkins c9e08217d8 fixed read while suspended issue with double dispatch 2011-11-15 17:09:10 +11:00
Greg Wilkins 722f390800 numerous findbugs inspired cleanups 2011-11-15 11:22:35 +11:00
Greg Wilkins 62e669ffa9 moved hasProgressed handling to only be in SslConnection 2011-11-11 12:34:46 +11:00
Greg Wilkins a62061944e removed EndPoint.isBufferingInput 2011-11-11 11:41:29 +11:00
Simone Bordet 09999a629d Removed EndPoint.isBufferingOutput(). 2011-11-10 21:52:33 +01:00
Simone Bordet 34fbbd5e28 Made the test case more robust.
The call to EndPoint.blockReadable() must be enclosed in a while loop, since the EndPoint
may be woken up spuriously or by write readyness, and no further bytes may be read.
2011-11-10 15:31:56 +01:00
Greg Wilkins 921b285235 Avoid flush if no content to flush 2011-11-10 14:45:28 +11:00
Greg Wilkins f37b617481 improved test failure message 2011-11-10 13:26:30 +11:00
Greg Wilkins 629b6360de removed EndPoint.isBuffered 2011-11-10 13:15:41 +11:00
Greg Wilkins 144195d435 removed redundant setConnection 2011-11-10 12:47:50 +11:00
Greg Wilkins 7504d24e9e Fixed SslConnection upgrade handling 2011-11-10 12:44:32 +11:00
Greg Wilkins 6e14902659 AsyncEndPoint is-a ConnectedEndPoint 2011-11-10 12:44:03 +11:00
Greg Wilkins e3cf7a8898 improved ThreadDeath handling 2011-11-10 12:40:29 +11:00
Greg Wilkins 7a9b8f1e9d reverted last changes due to instability 2011-11-10 12:11:58 +11:00
Greg Wilkins d61258ec4e clean ups from review from sbordet.
Removed isBufferred
fixed instanceof ThreadDeath
avoid race with onInputShutdown
2011-11-10 10:12:37 +11:00
Greg Wilkins 7e37d1a428 pool and compress the unwrap buffer 2011-11-10 00:19:54 +11:00
Greg Wilkins 32f7822c1a Reverted the unwrapBuf to not be pooled. 2011-11-09 23:38:09 +11:00
Greg Wilkins a95d2c11e2 removed debug 2011-11-09 17:41:10 +11:00
Greg Wilkins af4c40d793 fixed SSL buffer pool 2011-11-09 17:39:59 +11:00
Greg Wilkins a36342438c cleaned up some unit tests 2011-11-09 17:03:11 +11:00
Greg Wilkins 470e63b77b added SCEP stress test 2011-11-09 16:07:36 +11:00
Greg Wilkins 71734400e9 improved handling of RST 2011-11-09 15:07:47 +11:00
Jesse McConnell 2a6b8696d7 Merge branch 'master' into jetty-8 2011-11-08 15:59:55 -06:00
Joakim Erdfelt 4e89277210 Adjusting failing testcase to be more clear about failures 2011-11-08 14:26:34 -07:00
Joakim Erdfelt 3302d3fc60 Adjusting failing testcase to be more clear about failures 2011-11-08 14:25:10 -07:00
Greg Wilkins 5bf6f60396 copyright and comments 2011-11-09 08:13:29 +11:00
Greg Wilkins 66ea1e819a fixed test to use localhost 2011-11-09 08:13:00 +11:00
Greg Wilkins 7a082280f1 Merge remote-tracking branch 'origin/master' into jetty-7.6
Conflicts:
	example-jetty-embedded/pom.xml
	jetty-aggregate/jetty-all-server/pom.xml
	jetty-aggregate/jetty-all/pom.xml
	jetty-aggregate/jetty-client/pom.xml
	jetty-aggregate/jetty-plus/pom.xml
	jetty-aggregate/jetty-server/pom.xml
	jetty-aggregate/jetty-servlet/pom.xml
	jetty-aggregate/jetty-webapp/pom.xml
	jetty-aggregate/pom.xml
	jetty-ajp/pom.xml
	jetty-annotations/pom.xml
	jetty-client/pom.xml
	jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
	jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java
	jetty-continuation/pom.xml
	jetty-deploy/pom.xml
	jetty-distribution/pom.xml
	jetty-http-spi/pom.xml
	jetty-http/pom.xml
	jetty-http/src/main/java/org/eclipse/jetty/http/ssl/SslContextFactory.java
	jetty-io/pom.xml
	jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java
	jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
	jetty-jaspi/pom.xml
	jetty-jmx/pom.xml
	jetty-jndi/pom.xml
	jetty-jsp-2.1/pom.xml
	jetty-monitor/pom.xml
	jetty-nested/pom.xml
	jetty-nosql/pom.xml
	jetty-osgi/jetty-osgi-boot-jsp/pom.xml
	jetty-osgi/jetty-osgi-boot-logback/pom.xml
	jetty-osgi/jetty-osgi-boot-warurl/pom.xml
	jetty-osgi/jetty-osgi-boot/pom.xml
	jetty-osgi/jetty-osgi-equinoxtools/pom.xml
	jetty-osgi/jetty-osgi-httpservice/pom.xml
	jetty-osgi/pom.xml
	jetty-osgi/test-jetty-osgi/pom.xml
	jetty-overlay-deployer/pom.xml
	jetty-plus/pom.xml
	jetty-policy/pom.xml
	jetty-rewrite/pom.xml
	jetty-security/pom.xml
	jetty-server/pom.xml
	jetty-servlet/pom.xml
	jetty-servlets/pom.xml
	jetty-start/pom.xml
	jetty-util/pom.xml
	jetty-util/src/test/java/org/eclipse/jetty/util/log/LogTest.java
	jetty-util/src/test/java/org/eclipse/jetty/util/log/NamedLogTest.java
	jetty-webapp/pom.xml
	jetty-websocket/pom.xml
	jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD13.java
	jetty-xml/pom.xml
	pom.xml
	test-continuation-jetty6/pom.xml
	test-continuation/pom.xml
	test-jetty-nested/pom.xml
	test-jetty-servlet/pom.xml
	test-jetty-webapp/pom.xml
	tests/pom.xml
	tests/test-integration/pom.xml
	tests/test-loginservice/pom.xml
	tests/test-sessions/pom.xml
	tests/test-sessions/test-hash-sessions/pom.xml
	tests/test-sessions/test-jdbc-sessions/pom.xml
	tests/test-sessions/test-sessions-common/pom.xml
	tests/test-webapps/pom.xml
	tests/test-webapps/test-webapp-rfc2616/pom.xml
2011-11-07 18:09:31 +11:00
Greg Wilkins 202475aad9 clean build 2011-11-07 15:34:33 +11:00
Simone Bordet f1251412e4 Modified behavior of shutdownInput() and shutdownOutput() to always shutdown either input or output.
Calling socket.close() does not imply that socket.isInputShutdown() returns true, so there was a
possibility that code was calling ChannelEndPoint.shutdownInput(), but the input was not really
shutdown, and a subsequent call to ChannelEndPoint.isInputShutdown() returned false.
2011-11-04 15:22:43 +01:00
Joakim Erdfelt 5f653aa87a Minor tweak to SCEP.toString() to make it a bit more readable 2011-11-02 16:47:40 -07:00