Commit Graph

9862 Commits

Author SHA1 Message Date
Greg Wilkins a906aaa266 Simplified SelectorManager state machine
Made the SelectorManager use the CaS state machine for both locking and controlling
the mode of handling changes.

Replaced the concurrent change queue with a pair of array lists that are switched while the lock state is held
2014-10-17 14:16:48 +11:00
Greg Wilkins e8a843dc6a Submit selector interest changes
After seeing a stack trace with many threads blocked on setInterest, have reverted to always submitting changes
2014-10-17 12:36:02 +11:00
Simone Bordet 70894962a1 Merged branch 'jetty-9.2.x' into 'master'. 2014-10-16 21:23:22 +02:00
Simone Bordet e4b92d7d1c Added NPN 1.1.9.v20141016 URL. 2014-10-16 21:22:29 +02:00
Simone Bordet e25e2e2258 Merged branch 'jetty-9.2.x' into 'master'. 2014-10-16 19:48:38 +02:00
Simone Bordet 90e9cfc535 447381 - Disable SSLv3 by default.
Excluded by default also SSLv2Hello.
2014-10-16 19:46:33 +02:00
Simone Bordet 6268421dd0 Merged branch 'jetty-9.2.x' into 'master'. 2014-10-16 18:05:12 +02:00
Simone Bordet aea5070e51 447381 - Disable SSLv3 by default.
Excluded by default SSL, SSLv2 and SSLv3.
2014-10-16 17:53:52 +02:00
Simone Bordet f2eaa963f8 Removed debugging statements. 2014-10-16 17:42:32 +02:00
Simone Bordet 0a46378e6e Updated NPN and ALPN files and configuration for JDK 7u71, 7u72 and 8u25. 2014-10-16 17:15:15 +02:00
Simone Bordet 6f42d21ed5 446063 - ALPN Fail SSL Handshake if no supported Application Protocols. 2014-10-16 15:31:24 +02:00
Greg Wilkins aad1f9d058 447515 Remove GzipFilter
Made GzipHandler the same as AsyncGzipFilter
Added a HttpOutput.Interceptor
2014-10-16 20:50:11 +11:00
Jan Bartel 4120405b8e Make PushCacheFilter a system class so it is loaded with container classloader. 2014-10-16 19:22:26 +11:00
Jan Bartel 6a6c8bacda NPE protect DefaultServlet iteration through request fields 2014-10-16 19:02:21 +11:00
Greg Wilkins ec79a6f88e Improve HTTP header pre-encoding
The HttpContent class has been reworked to store HttpField instances, we may be generated on
demand or instances of PreEncodedHttpField.

The encoding of HTTP2 fields has been generalized to handle both indexed and literal fields, selected
by header enum set.

Default servlet and response classes have been cleaned up in how they set response headers.
2014-10-16 12:31:37 +11:00
Simone Bordet 61ec3efd65 Cosmetics. 2014-10-15 11:39:32 +02:00
Greg Wilkins ea64d32214 447216 putAll Properties in XmlConfiguration 2014-10-15 18:28:46 +11:00
Jan Bartel 1729fb045c 446923 SharedBlockingCallback does not handle connector max idle time of Long.MAX_VALUE; BlockerTimeoutException not serializable 2014-10-15 18:17:01 +11:00
Greg Wilkins d82809d2f1 Simplified state machine for select interest update.
The state machine now simply tracks if the endpoint is selecting or has been selected.
The slight complexity is that any transition between these two states goes via a locked
state, where there is exclusive access to the interested ops and selection key.
2014-10-15 17:33:58 +11:00
Greg Wilkins 8c85b2f591 improved http2 static entry generation 2014-10-15 14:04:54 +11:00
Greg Wilkins 6b489c78b6 Merge remote-tracking branch 'origin/jetty-9.2.x' 2014-10-15 11:46:42 +11:00
Greg Wilkins 8a555e669a 444031 Ensure exceptions do not reduce threadpool below minimum 2014-10-15 11:22:53 +11:00
Simone Bordet 395ecd2b70 Fixed race in updating the key interests.
It was possible that updateKey() was seeing a SELECTING state and
therefore attempt to call setKeyInterests(), while changeInterests()
was also seeing the SELECTING state, then moving to CHANGING so that
_interestOps was accessed concurrently.

Also made the update task to call updateKey() instead of calling
directly setKeyInterests(), in order to comply with the state
machine; this required to have onSelected() handle additional states
that are created by updateKey().

Finally, in updateKey() now setKeyInterests() is called before
updating the state to isolate the call into its own state.
2014-10-14 20:40:13 +02:00
Simone Bordet 890d7a8d1f Merged branch 'jetty-9.2.x' into 'master'. 2014-10-13 22:01:20 +02:00
Simone Bordet 82d86ed0d0 Fixed typo. 2014-10-13 21:42:31 +02:00
Simone Bordet 9796457dfc 446672 - NPN Specification issue in the case no protocols are selected. 2014-10-13 21:27:11 +02:00
Simone Bordet fb590a5fff Fixed merge conflict. 2014-10-13 17:10:03 +02:00
Simone Bordet e7d830c26e Merged branch 'jetty-9.2.x' into 'master'. 2014-10-13 16:57:52 +02:00
Simone Bordet abdd2e4ff0 440729 - SSL requests often fail with EOFException or IllegalStateException.
Fixed IllegalStateException by handling NEED_UNWRAP for the CLOSED
state in fill().
The EOFException does not seem to be an issue with the client.

Also removed an unneeded catch block and an empty if statement.
2014-10-13 16:55:59 +02:00
Simone Bordet 2dba2ea2c2 Improved exception reporting. 2014-10-13 16:55:59 +02:00
Joakim Erdfelt 8d85940077 Moving HttpTester to "tests" scoped jetty-http artifact.
+ HttpTester, a testing class, was used by jetty-servlets,
   embedded-jetty-examples, and test-integration, all from
   those testing scopes.  Moved the HttpTester into the
   pre-existing jetty-http "tests" classified artifact.
2014-10-13 07:35:12 -07:00
Joakim Erdfelt 1511be8c97 Committing proper testcase for bug 440823 2014-10-11 22:51:15 -07:00
Joakim Erdfelt dec984302a Merge branch 'jetty-9.2.x'
Conflicts:
	jetty-server/src/test/java/org/eclipse/jetty/server/handler/RequestLogHandlerTest.java
2014-10-10 16:14:06 -07:00
Joakim Erdfelt e7b86b99cb 445823 - RequestLogHandler at end of HandlerCollection doesn't work
+ Adding more varieties of server side collection vs wrapper with error
  handlers
+ Adding servlet version of tests to demonstrate behavior in servlet
  context, when also using the mapped error handler
2014-10-10 11:21:40 -07:00
Greg Wilkins a94e0287b9 446559 Avoid spin consuming extra data 2014-10-10 22:30:54 +11:00
Jan Bartel e292b572f1 446425 Oracle Sql error on JettySessions table when this table do not exist already 2014-10-10 17:36:36 +11:00
Jan Bartel dd864f9799 443529 CrossOriginFilter does not accept wildcard for allowedHeaders 2014-10-10 15:53:13 +11:00
Greg Wilkins bb2d77f00b Merge remote-tracking branch 'origin/jetty-9.2.x' 2014-10-10 14:20:30 +11:00
Greg Wilkins 6a0e220b9c 446506 getAsyncContext ISE before startAsync on async dispatches 2014-10-10 14:19:42 +11:00
Greg Wilkins cd15bb187d 446559 Avoid spin consuming extra data 2014-10-10 13:16:41 +11:00
Jan Bartel f07387c703 442942 Content sent with status 204 (No Content) 2014-10-10 12:58:45 +11:00
Greg Wilkins 0df54fd279 fixed merge 2014-10-10 09:17:48 +11:00
Greg Wilkins 984b3c491f Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project 2014-10-10 08:54:42 +11:00
Greg Wilkins 7e68a98dcd fixes from merge 2014-10-10 08:54:11 +11:00
Greg Wilkins 758ce66c8d Merge remote-tracking branch 'origin/jetty-9.2.x'
Conflicts:
	jetty-websocket/pom.xml
	tests/test-sessions/test-mongodb-sessions/pom.xml
2014-10-10 08:53:43 +11:00
Simone Bordet 96cf942b70 Fixed race condition in onSelected().
WebSocket and multiplexed protocols are always read interested.
It may happen that while the application is writing, the write
blocks, resulting in a call to changeInterests().
At the same time, the selector may detect data to read and call
onSelected(), so there is a possibility that onSelected() runs
concurrently with changeInterests().

The fix adds an additional state (PROCESSING) that isolates the
changes that onSelected() makes to _interestOps, spin-waiting if
changeInterests() is running concurrently.
Likewise, changeInterests() spin-waits until onSelected() is running
concurrently.
2014-10-09 22:46:04 +02:00
Simone Bordet 76278d3563 Fixed race condition causing onSelected() to throw IllegalStateException.
The race was happening when updateKey() lost the race with
changeInterests() to update the interests and subsequently the key.
In that case, the selector thread that called updateKey() was returning
while changeInterests() was executing the CHANGING state.
Since updateKey() lost the race, the actual key interests was still
(typically) OP_READ so the selector thread would select() and call
onSelected() while changeInterests() was still executing, causing the
IllegalStateException.
2014-10-09 16:43:50 +02:00
Simone Bordet 649eb7f3dc Introduced factory method to create JDK's Selector instances. 2014-10-09 10:08:15 +02:00
Jan Bartel 060a26ecfe 443530 CrossOriginFilter does not set the Vary header 2014-10-09 17:23:01 +11:00
Jan Bartel 34fafcce4c 442419 CrossOriginFilter javadoc says "exposeHeaders", but should be "exposedHeaders" 2014-10-09 14:10:27 +11:00