Commit Graph

1533 Commits

Author SHA1 Message Date
Simone Bordet 923ec38adf Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2020-01-07 16:51:25 +01:00
Simone Bordet e3c8546667 Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2020-01-07 16:35:05 +01:00
Simone Bordet de890bb1b7 Happy New Year 2020.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-07 16:25:32 +01:00
Joakim Erdfelt f4e7e4c3db Merge branch 'release-9.4.25' into jetty-9.4.x 2020-01-03 12:49:27 -06:00
olivier lamy e1371a1c13 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:54:05 +01:00
Joakim Erdfelt 8974176c4b Updating to version 9.4.26-SNAPSHOT 2019-12-20 11:30:41 -06:00
Joakim Erdfelt a9729c7e7f Updating to version 9.4.25.v20191220 2019-12-20 10:46:56 -06:00
Simone Bordet d7cf3729a5
Merge pull request #4354 from eclipse/jetty-9.4.x-4351-lazy-servlet-init-not-atomic
Issue #4351 Lazy servlet init is not atomic
2019-11-28 11:44:38 +01:00
Simone Bordet dc0fac5806 Issue #4351 - Lazy servlet init is not atomic.
Code cleanup.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-28 11:07:24 +01:00
Jan Bartel 07efbb728d Issue #4351 Lessen wait times.
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-28 09:34:39 +11:00
Jan Bartel a6cdec548c Revert "Issue #4351 Found simpler test"
This reverts commit 5bc6593337.
2019-11-28 09:16:14 +11:00
Jan Bartel 5bc6593337 Issue #4351 Found simpler test
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-26 11:03:41 +11:00
Jan Bartel f0a3d465ec Issue #4351 Changes post review.
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-26 08:43:11 +11:00
Jan Bartel ec2ad2099e Issue #4351 Lazy servlet init is not atomic
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-25 11:57:19 +11:00
Joakim Erdfelt 0f7a3b2d91 Updating to version 9.4.25-SNAPSHOT 2019-11-20 16:08:38 -06:00
Joakim Erdfelt 363d5f2df3 Updating to version 9.4.24.v20191120 2019-11-20 15:25:01 -06:00
Joakim Erdfelt 453d41940b Updating to version 9.4.24-SNAPSHOT 2019-11-18 13:52:51 -06:00
Joakim Erdfelt abbccc65d6 Updating to version 9.4.23.v20191118 2019-11-18 13:09:44 -06:00
Greg Wilkins b24c6ce68d
Issue #2340 ServletContext cleanup (#4307)
* Issue #2340 ServletContext cleanup

A minor cleanup of the ServletContext implementation classes.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2340 ServletContext cleanup

cleanup after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-14 11:52:03 +11:00
Joakim Erdfelt 43d95cd984 Updating to version 9.3.29-SNAPSHOT 2019-11-05 13:02:10 -06:00
Joakim Erdfelt d7dd68d6e9 Updating to version 9.3.28.v20191105 2019-11-05 11:46:40 -06:00
Joakim Erdfelt b17439c731 Updating to version 9.2.30-SNAPSHOT 2019-11-05 11:23:21 -06:00
Joakim Erdfelt 36c95fdd43 Updating to version 9.2.29.v20191105 2019-11-05 10:43:15 -06:00
Joakim Erdfelt 1ed13b6b30 Updating to version 9.4.23-SNAPSHOT 2019-10-22 09:19:41 -05:00
Joakim Erdfelt b1e6b55512 Updating to version 9.4.22.v20191022 2019-10-22 08:20:50 -05:00
Greg Wilkins 2ee874a8ac Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-4191-min-gzip-size
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 22:00:52 +11:00
Greg Wilkins 1881683726 Issue #4191 Min GzipSize
updates from review in absence of OP.
Make break even size a warning rather than a hard limit.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 16:22:14 +11:00
Greg Wilkins 73924d2774
Issue #4188 Spin in close of GzipHandler (#4198)
* Issue #4188 Spin in close of GzipHandler

Cleanup and simplify code

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4188 Spin in close of GzipHandler

Fix slice code. Added unit test for it.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4188 Spin in close of GzipHandler

Fixed last slice.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* cleanup from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 14:12:52 +11:00
Greg Wilkins 2eb251a4b8 fix logging defaults to INFO
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 13:53:57 +11:00
Joakim Erdfelt 9c49b03806
Adding missing license header
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-15 13:32:59 -05:00
Joakim Erdfelt 0fbb507841
Issue #4191 - GzipHandler.minGzipSize cannot be lower then 23.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-14 13:21:01 -05:00
Greg Wilkins 1c5a53a512 test async gzip close
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-08 18:14:17 +11:00
Joakim Erdfelt 7d533bdabc
Adding missing copyright header.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-01 17:30:24 -05:00
Joakim Erdfelt 0a5c710bdd
Fixes #4141 - Servlet not async + async Filter + wrapped request
+ Fixing ClassCastException

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-01 17:24:27 -05:00
Joakim Erdfelt 7807eafad9 Updating to version 9.4.22-SNAPSHOT 2019-09-26 10:46:28 -05:00
Joakim Erdfelt 72970db61a Updating to version 9.4.21.v20190926 2019-09-26 09:59:15 -05:00
Joakim Erdfelt 39c230f294
Merge pull request #4083 from eclipse/jetty-9.4.x-97-Unavailable
Issue #97 ServletHolder unavailable handling
2019-09-13 09:58:09 -05:00
Greg Wilkins ae0ab46066 Issue #97 Unavailable handling
Added test for servlet component lifecycle
Fixed bug where we were destroying listeners before calling them.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-13 11:40:11 +10:00
Greg Wilkins d48c258deb Issue #97 ServletHolder unavailable handling
Took the opportunity to do a major cleanup of the Holders.
ServletHolder now uses wrapping to achieve optional behaviour rather than lots of if statements.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-09-12 17:56:09 +10:00
Joakim Erdfelt 43e10f8a5e
Merge pull request #4056 from eclipse/jetty-9.4.x-testing-embedded-examples
Unit Testing the Embedded Examples
2019-09-11 09:20:10 -05:00
Jan Bartel f90a07371c Issue #4022 Add extra ServletRegistration tests & checkstyle fixes 2019-09-10 10:24:58 +10:00
dreis2211 597458df7c Tolerate multiple Accept-Encoding headers in GzipHandler
Signed-off-by: dreis2211 <christoph.dreis@freenet.de>
2019-09-08 01:44:05 +02:00
Joakim Erdfelt 7618eae915 Issue #4064 - MinimalServlets test and ServletHolder fix
+ Also made ContextHandler warning message about features
  that are unimplemented (and you should use ServletContextHandler)
  more clear. (this helped with diagnosing where the bug was
  in ServletHolder)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-09-06 09:26:06 -05:00
康智冬 49ba6d1acb fix typo and grammar (#4045)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-02 14:29:50 -04:00
Jan Bartel 4251a3e092
Issue #4022 Prevent Servlet adding another Servlet (#4024)
* Issue #4022  Prevent Servlet adding Servlet and added unit tests.

Signed-off-by: Jan Bartel <janb@webtide.com>
2019-08-28 12:29:14 +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
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
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
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
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