10079 Commits

Author SHA1 Message Date
Joakim Erdfelt
17aa2eaf7a Adding note about weld requirement on .getServerInfo() 2014-10-09 15:11:07 -07: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
Joakim Erdfelt
67db9e67de Merge branch 'jetty-9.2.x' into cdi-testing 2014-10-09 12:42:14 -07: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
Joakim Erdfelt
2f696e87bd 445258 - STOP.WAIT is not really respected
Fixing stupid typo / copy / paste bug
2014-10-08 15:01:05 -07:00
Joakim Erdfelt
eee2ab0f10 445979 - jetty.sh fails to start when start-stop-daemon does not exist and the user is not root
+ Adding better JETTY_USER test into jetty.sh
2014-10-08 14:54:00 -07:00
Joakim Erdfelt
ab930aae9f 446033 - org.eclipse.jetty.websocket.server.WebSocketServerFactory not available in OSGi
+ Tweaking version identifiers in websocket
+ Adding oej.websocket.server.pathmap to Dynamic-Import of
  websocket-servlet manifest
2014-10-08 14:46:57 -07:00
Joakim Erdfelt
0f01f7edbd 446107 - NullPointerException in ProxyServlet when extended by Servlet
without a package 

+ Adding null check
2014-10-08 14:38:16 -07:00
Joakim Erdfelt
1f543e9983 System.lineSeparator exists 2014-10-08 11:02:13 -07:00
Joakim Erdfelt
086bea097d Using StandardCharset where appropriate 2014-10-08 11:02:13 -07:00
Joakim Erdfelt
8e99c51d86 fixing url to jetty 2014-10-08 11:02:13 -07:00
Joakim Erdfelt
eb39d75f29 Javadoc update 2014-10-08 11:02:13 -07:00
Jan Bartel
3eb42e7183 445830 Support setting environment variables on forked jetty with jetty:run-forked 2014-10-03 14:27:35 +10:00
Joakim Erdfelt
61dd2c9620 Fixing encoding tests (that actually didn't validate results) 2014-10-02 15:12:32 -07:00
Joakim Erdfelt
43d2c59394 445821 - Error 400 should be logged with RequestLog
+ Adding BadRequestLogHandlerTest to demonstrate error 400 not being
captured by RequestLogHandler
2014-10-02 13:55:14 -07:00
Joakim Erdfelt
e93e024166 445823 - RequestLogHandler at end of HandlerCollection doesn't work
+ Adding example of RequestLogHandler use in HandlerCollection
2014-10-02 13:54:22 -07:00
Joakim Erdfelt
3636bd6894 Moving hardcoded ports to ephemeral range suitable for more environments 2014-10-02 10:31:32 -07:00
Joakim Erdfelt
7635b3cd49 Merge branch 'jetty-9.2.x' into cdi-testing 2014-10-01 14:46:05 -07:00
Jan Bartel
8bca0bbe7e Add mongo sessinon manager module tests back into build, but skipped 2014-10-01 17:51:38 +10:00
Jan Bartel
e448ea0ab1 444595 nosql/mongodb - Cleanup process/Refreshing does not respect encoding of attribute keys 2014-10-01 16:21:25 +10:00
Jan Bartel
bc265953a5 445495 Improve Exception message when no jndi resource to bind for a name in web.xml 2014-10-01 13:29:23 +10:00
Jan Bartel
149ee01047 445157 First redeployed servlet leaks WebAppContext 2014-10-01 13:03:39 +10:00
Joakim Erdfelt
d0fa66ddf0 445542 - Add SecuredRedirectHandler for embedded jetty use to redirect to secure port/scheme
+ Adding SecuredRedirectHandler as option for those jetty embedded folks
  to have a simple http -> https solution (can even be setup and bound
  to specific connectors via the named virtualhosts concepts)
2014-09-30 12:54:42 -07:00
Joakim Erdfelt
93520df3f9 445374 - Reevaluate org.eclipse.jetty.websocket.jsr356 enablement concepts
+ Since SCI adds filters, but init() isn't run till later, that means
  the context attribute for the WebSocketUpgradeFilter isn't present
  during jsr356 runs.  Added ability for manual filter creation to call
  setToAttribute() as a pre-init step, allowing the init() itself to
  bypass the set to attribute for that specific filter instance.
+ This also means ServletException is now thrown out from the
  various configureContext() static methods.
2014-09-30 10:56:48 -07:00
Joakim Erdfelt
7e54472801 445374 - Reevaluate org.eclipse.jetty.websocket.jsr356 enablement concepts
+ After talking it through with Simone, swapping out 'global' init-param
  with a bit more robust 'contextAttributeKey' to handle the automatic
  context.setAttribute() of the filter itself.
  As simply having a filter in the web.xml makes it alive, but nothing
  is wired up into it, and accessing the filter instance via the
  context metadata seems impossible.  So we made the init-param for
  'contextAttributeKey' important and required, but with defaulting
  and validation checks.
2014-09-30 10:08:44 -07:00
Joakim Erdfelt
6500931f8c 445374 - Reevaluate org.eclipse.jetty.websocket.jsr356 enablement concepts
+ Making key also work inside of WEB-INF/web.xml via context params
+ Making WebSocketUpgradeFilter generic enough to be used in a
  web.xml descriptor
+ Adding global={bool} init-param on WebSocketUpgradeFilter to aid
  library developers and end users more ways to tweak the filter
  order
2014-09-30 07:40:07 -07:00
Joakim Erdfelt
bf7637a2df Reworking cdi-webapp-it to also use new cdi module 2014-09-26 17:16:35 -07:00
Joakim Erdfelt
c3670d01e1 445239 - Rename weld.mod to cdi.mod to be consistent with past module namings 2014-09-26 17:15:51 -07:00
Joakim Erdfelt
1e7cca37e5 Reworking CDI tests to be formal integration tests 2014-09-26 16:40:12 -07:00
Joakim Erdfelt
d42d8f10c2 Expose Decorator in default serverClasses list 2014-09-26 10:42:21 -07:00
Joakim Erdfelt
5cdbca9a0f Merge branch 'jetty-9.2.x' into cdi-testing 2014-09-26 10:15:42 -07:00
Simone Bordet
6ed0170913 Removed call to Thread.dumpStack(). 2014-09-26 11:34:26 +02:00
Simone Bordet
bcbefd3942 Fixed race where the key interests were set before updating the
state, causing onSelected() to be called with the wrong state and
failing an assertion.
2014-09-26 10:13:16 +02:00
Simone Bordet
8d2efaf7eb 445167 - Allow configuration of dispatch after select.
Introduced parameter "dispatchIO" in the relevant factories so that
they can be configured by users and connections will be created
taking into account this parameter.

For less configurable connection factories, this parameter is
currently hardcoded to either true or false depending on the case.
For example, ALPN and NPN connections have it to false, since they
don't do any blocking operation in onFillable().
2014-09-26 10:13:16 +02:00
Simone Bordet
a8b461fe91 Cosmetics: removed unused imports, cleaned up source code, improved javadocs. 2014-09-26 10:13:16 +02:00
Simone Bordet
8af9ea4030 Calling notIdle() to avoid the idle timeout triggers when sending frames. 2014-09-26 10:13:16 +02:00
Simone Bordet
9a1acd59fc Made test more robust. 2014-09-26 10:13:15 +02:00
Simone Bordet
a9dcfd5c5a Removed rotten comment and cleaned up javadocs. 2014-09-26 10:13:15 +02:00
Simone Bordet
54cd00aec3 Javadocs cleanup. 2014-09-26 10:13:15 +02:00
Jesse McConnell
91f44dd6c6 Merge branch 'release-9' 2014-09-25 07:57:12 -05:00
Joakim Erdfelt
90af0a4e5f 437303 - Serving of static filenames with "unwise" characters causes 404
error 

+ Adding testcases for the rest of the unwise characters to show how
PathResource works vs the venerable FileResource
2014-09-24 15:46:08 -07:00
Joakim Erdfelt
ab58438600 396569 - 'bin/jetty.sh stop' reports 'OK' even when jetty was not
running 

+ Validating PID file and contents a bit more
2014-09-24 12:54:38 -07:00
Joakim Erdfelt
45bcb6df3a 396572 - Starting jetty from cygwin is not working properly
+ Fixing #!/usr/bin/env bash 
  (it had extra spaces at end which breaks env lookup on cygwin)
+ Using cygpath -w liberally to allow java started from cygwin
  to find resources using windows specific path names.
2014-09-24 10:47:26 -07:00
Joakim Erdfelt
840316797d 376365 - "jetty.sh start" returns 0 on failure
+ simple hack to produce error 1 on xml validation issue
2014-09-24 10:47:26 -07:00