Commit Graph

19268 Commits

Author SHA1 Message Date
Greg Wilkins e05a14de24 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-27 14:30:29 +10:00
Greg Wilkins 1f189d4618 fixed test visibility for JPMS
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 14:30:03 +10:00
Greg Wilkins c047f3c13c Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-27 14:28:18 +10:00
Olivier Lamy 5403a30b32 session#getLastAccessedTime should throw IllegalStateException if session has been invalidated (#4023)
* per servlet api javadoc getLastAccessedTime should throw IllegalStateException if session has been invalidated

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* isInvalid test should be done within lock

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-27 13:13:18 +10:00
Olivier Lamy b51d770807
session#getLastAccessedTime should throw IllegalStateException if session has been invalidated (#4023)
* per servlet api javadoc getLastAccessedTime should throw IllegalStateException if session has been invalidated

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* isInvalid test should be done within lock

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-27 13:03:28 +10:00
Greg Wilkins 7bc04d3d4f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-27 13:01:59 +10:00
Greg Wilkins d216792d23 Made test not fail in symlinked directory
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 13:01:34 +10:00
Greg Wilkins 06db58d12c Merge branch 'jetty-10.0.x' of github.com:eclipse/jetty.project into jetty-10.0.x 2019-08-27 11:40:03 +10:00
Greg Wilkins 15e2f72264 updated after merge to fix tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 11:33:06 +10:00
Jan Bartel 4b1a1560c4 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-27 11:01:50 +10:00
Jan Bartel 19980ceeb5
Issue #4009 ServletContextHandler setSecurityHandler broke handler chain (#4012)
* Issue #4009 ServletContextHandler setSecurityHandler broke handler chain

Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-27 11:00:09 +10:00
Jan Bartel fabc50ecc5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-27 10:56:15 +10:00
Jan Bartel 387e33acaf
Issue #4006 Fix ClusteredSessionMigrationTest (#4010)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-27 10:53:54 +10:00
Greg Wilkins 5164f7bb41 fixed merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 10:52:27 +10:00
Greg Wilkins 8f6e028f05 remove duplicate ignores
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 08:41:00 +10:00
Greg Wilkins af8587c108 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-27 08:15:41 +10:00
Greg Wilkins bde86467f4
Issue #3806 - Make Async sendError fully Async (#3912)
* Issue #3806 async sendError

Avoid using isHandled as a test withing sendError as this can be
called asynchronously and is in a race with the normal dispatch of the
request, which could also be setting handled status.

The ErrorHandler was dispatching directly to a context from within
sendError.  This meant that an async thread can call sendError and be
dispatched to within the servlet container at the same time that the
original thread was still dispatched to the container.

This commit fixes that problem by using an async dispatch for error
pages within the ErrorHandler.  However, this introduces a new problem
that a well behaved async app will call complete after calling
sendError.  Thus we have ignore complete ISEs for the remainder of
the current async cycle.

Fixed the closing of the output after calling sendError. Do not
close if the request was async (and thus might be dispatched to an
async error) or if it is now async because the error page itself is
async.

* updates from review
* better tests
* revert ignore complete
* added some TODOs
* more TODOs
* fixed rename
* cleanup ISE and more TODOs
* refactored to call sendError for uncaught exceptions rather than onError
* more of the refactor
* extra tests for sendError from completing state

Reworked HttpChannelState and sendError so that sendError is now
just a change of state. All the work is done in the ErrorDispatch
action, including calling the ErrorHandler.  Async not yet working.

Additional tests

Converted ERRORED state to a separate boolean so it can be used for
both Sync and Async dispatches.

Removed ASYNC_IO state as it was just the same as DISPATCHED

The async onError listener handling is now most likely broken.


WIP making sendError simpler and more tests pass
WIP handling async and thrown exceptions
WIP passing tests

Improved thread handling

removed bad test

Implemented error dispatch on complete properly
more fixed tests

sendError state looks committed

- Added resetContent method to leave more non-content headers during sendError
- Fixed security tests
- simplified the non dispatch error page writing.  Moved towards being able to write async

* fixed gzipHandlerTest

* Updated handling of timeout errors.  According to servlet spec,
exceptions thrown from onTimeout should not be passed to onError, but
just logged and ignored:

   If an exception is thrown while invoking methods in an AsyncListener,
   it is logged and will not affect the invocation of any other AsyncListeners.

* This changes several tests.

* Dispatcher/ContextHandler changes for new ERROR dispatch handling. Feels a bit fragile!

* Fixed tests in jetty-servlets
* Fixed tests in jetty-proxy

* more test fixes

* Fixed head handling
reverted unnecessary changes
Improved reason handling

WIP on fully async error handling.
Simplified HttpChannelState state machines to allow for async actions
during completing

more WIP on fully async error handling.

sendError and completion are not both non-blocking, without using
a startAsync operation. However we are lacking unit tests that actually
exercise those code paths.

* Simplified name of states
Added test for async completion
* Cleanups and javadoc
* Cleanups and javadoc
* remove snake case
* feedback from review
* Write error page into fixed pooled buffer

Use the response to get/release a pooled buffer into which the error
page can be written.  Make it a fixed sized buffer and if it overflows
then no error page is generated (first overflow turns off showstacks
to save space).

The ErrorHandler badly needs to be refactored, but we cannot change
API in jetty-9

* More test fixes for different error page format
* minor cleanups
* Cleanup from Review
* Fixed javadoc
* cleanups and simplifications
* Cleanup from Review
* renaming and some TODOs
* Cleanup from Review
* Checkstyle fixes
* Cleanup from Review
* Code cleanups and simplifications
* fixed debug
* Cleanup from Review
* Ensure response sent before server shutdown
* removed unnecessary optimisation
* fixed duplicate from merge
* Updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-26 17:55:58 +10:00
Jan Bartel 9534940578 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-26 15:55:08 +10:00
Jan Bartel 0f8230c05b
Issue #3936 Provide write-through modes for the NullSessionCache (#3984)
* Issue #3936 Provide write-through modes for the NullSessionCache

Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-26 15:22:20 +10:00
Joakim Erdfelt 36ef975353 Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterTest.java
#	jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java
2019-08-23 08:52:52 -05:00
Joakim Erdfelt 89d7469806 Merge branch 'jetty-10.0.x' of github.com:eclipse/jetty.project into jetty-10.0.x 2019-08-23 07:41:48 -05:00
Joakim Erdfelt 1867d24ef7
Merge pull request #4001 from eclipse/jetty-9.4.x-4000-swedish-unicode-file-serving
Issue #4000 - new SameFileAliasChecker to help with NFC/NFD UTF-8 differences
2019-08-23 07:27:32 -05:00
Joakim Erdfelt f15ca7765e
Merge pull request #3994 from eclipse/jetty-9.4.x-3985-cookie-parsing
Fixes #3985 - Updates to CookieCutter to reject no-equal cookies
2019-08-23 07:27:23 -05:00
olivier lamy cf592469aa checkstyle fixes.
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-23 13:09:15 +10:00
olivier lamy 80d513e979 junit failure after bad merge
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-23 10:56:24 +10:00
Joakim Erdfelt 9e6b24e916 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-22 17:04:22 -05:00
Joakim Erdfelt 12e1473fd0 Adding reference to javax.websocket issue
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 17:04:01 -05:00
Joakim Erdfelt 6aaf22ec6c Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 17:02:19 -05:00
Joakim Erdfelt 45dfd14cd5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-22 16:45:25 -05:00
Joakim Erdfelt 5bcbe0f9d9 Adding javax.websocket secure client example
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 16:45:04 -05:00
olivier lamy e1656aecc7 fix compilation
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-23 06:58:54 +10:00
Joakim Erdfelt ceff82ac57 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-22 15:09:44 -05:00
Joakim Erdfelt d0ec6e7d07
Merge pull request #3995 from eclipse/jetty-9.4.x-3983-jarfileresource-list
Fixes #3983 - JarFileResource directory listing is invalid
2019-08-22 15:09:16 -05:00
Joakim Erdfelt 318045cd87 Issue #3985 - Applying PR Review to CookieCutter
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 12:46:23 -05:00
Joakim Erdfelt e7765ab576
Merge pull request #4015 from akurtakov/jetty-9.4.x
Update Tycho and Eclipse CBI plugins.
2019-08-22 08:52:19 -05:00
Alexander Kurtakov 7f5aa89042 Update Tycho and Eclipse CBI plugins.
* Tycho to 1.4.0
* CBI to 1.1.7

These updates are important for both speed and m2e compatibility so
warnings are not shown in the eclipse ide.

Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-08-22 16:06:06 +03:00
olivier lamy 595e058fa3 touch to test github/jenkins
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 20:53:46 +10:00
olivier lamy 2cbdb27e5b touch to test github/jenkins
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 20:51:34 +10:00
olivier lamy a36af67abf Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-08-22 20:45:57 +10:00
Olivier Lamy fe3d3f7158
fix checkstyle in test sources (#4013)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 19:56:41 +10:00
Joakim Erdfelt 88e37b177c Issue #4000 - Name change to isSameName
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-21 17:11:44 -05:00
Simone Bordet 1a0f08b84d Improve test performance.
Running with the LEGACY compliance will take ~10 minutes for this test.
Running with the RFC7578 compliance will take ~1 min 45 secs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-08-21 21:13:13 +02:00
Joakim Erdfelt c1c241349e Issue #3985 - Applying PR Review to CookieCutter
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-21 12:54:26 -05:00
Joakim Erdfelt 4ab0be9b1b Issue #3983 - Applying PR review to JarFileResource
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-21 12:43:25 -05:00
Joakim Erdfelt 30bd3914cf Issue #4000 - SameFileAliasChecker to help with NFD/NFC
+ Adding SameFileAliasChecker to help with environments
  where the Alias and the Path point to the same file,
  by relying on the FileSystem and Path implementation
  to make the determination if the two Path references
  truly point to the same file.
+ Minor cleanup of FileSystemResourceTest
+ Additional DefaultServletTest for this UTF-8 differences

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-21 12:21:04 -05:00
Greg Wilkins d04c5f1e2a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-20 16:23:09 +10:00
Bruce a1bb3b4491 fix formatting and change comment flags to attributes
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00
Bruce 6ad148c8f9 parse samesite from cookie comment flag utility functions
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00
Bruce 2e5f6fca4b parse SameSite specifier from cookie comment and move HttpOnly comment parsing to org.eclipse.jetty.http.HttpCookie
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00
Bruce 7c691acbbe use null instead of EXCLUDED to indicate no SameSite attribute should be sent
Signed-off-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2019-08-20 15:12:03 +10:00