Commit Graph

1763 Commits

Author SHA1 Message Date
olivier lamy aaeffb719e Updating to version 10.0.0-SNAPSHOT 2020-07-09 12:25:34 +10:00
olivier lamy 23c99ffdbe Updating to version 10.0.0.beta1 2020-07-09 11:20:55 +10:00
Jan Bartel bd15434915 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-06 10:37:32 +02:00
Jan Bartel d785b590b1
Issue #5000 Fix NPE in FilterMapping.appliesTo (#5005)
* Issue #5000 Fix NPE in FilterMapping.appliesTo

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-07-06 10:24:10 +02:00
Joakim Erdfelt e1c8a0e8b8
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-25 12:52:29 -05:00
Joakim Erdfelt 3adec35cf5
Fixing CustomImportOrder checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-25 09:25:05 -05:00
Joakim Erdfelt 6df6fa33b8 Updating to version 9.4.31-SNAPSHOT 2020-06-11 08:24:34 -05:00
Joakim Erdfelt 271836e4c1 Updating to version 9.4.30.v20200611 2020-06-11 07:21:18 -05:00
Greg Wilkins fb6a445639
Issue #4741 No Servlet Path (#4898)
* Issue #4741 HttpServletMapping

This completes the refactoring started in #4851, using
the HttpServletMapping field to avoid having the servletPath field
in the Request and instead have a pathInContext field.

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

* Issue #4741 HttpServletMapping

reverted ResourceService changes

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

* Issue #4741 HttpServletMapping

fixed gzip handler

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

* Issue #4741 HttpServletMapping

Fixed several TODOs left in the code
removed _contextPath field and used an attributes lookup for include
replaced setContextPaths with setContext

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

* Issue #4741 HttpServletMapping

Used the same pattern from the contextPath changes for servletPath and pathInfo.   Now the servletPathMapping is always set on the request and only if the dispatch is an include do the effected methods look deeper for the source values.

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

* Issue #4741 HttpServletMapping

Improved javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-28 12:17:22 +02:00
Joakim Erdfelt 5d6f3e2ddc Updating to version 9.4.30-SNAPSHOT 2020-05-21 13:42:25 -05:00
Joakim Erdfelt 77c232aed8 Updating to version 9.4.29.v20200521 2020-05-21 12:04:14 -05:00
Lachlan 8d5430bc60
Issue #4741 - fix issues with HttpServletMapping (#4851)
* Issue #4741 - fixes to jetty implementation of HttpServletMapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - don't lazily generate HttpServletMapping to preserve servletName

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - tests should expect no leading / for matchValue

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* resolving TODOs from review

- removed pathSpec from Request
- getServletMapping moved to ServletHandler

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - only create HttpServletMapping for exact matches once

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* use wrapped attributes for async dispatch

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - Changes from review, revert async attribute wrapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - Changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 Async ServletMapping

Greatly increased the scope of this PR by combining the servletPath and
pathInfo into the ServletPathMapping class that implements the
HttpServletPathMapping interface.    This allows us to greatly simplify
the matching of servlets and reduce the number of times we need to
actually to the match per request.

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

* Issue #4741 Async ServletMapping

Fixed problems with previous commit
more cleanup of attributes in dispatcher.

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

* Issue #4741 Async ServletMapping

More code cleanups

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

* Issue #4741 Async ServletMapping

Named dispatch cleanup

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

* Issue #4741 Async ServletMapping

misc cleanup

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

* Issue #4741 Async HttpServletMapping

Added tests for named dispatchers
Do not use ServletPathMapping for named dispatch

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

* Issue #4741 Async HttpServletMapping

renamed confusing isDefault method on ServletMapping

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

* Issue #4741 Async HttpServletMapping

simplified setAttribute

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

* Issue #4741 Async HttpServletMapping

added javadoc about AsyncAttributes

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

* Issue #4741 Async HttpServletMapping

Fixed javadoc

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

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2020-05-20 15:23:32 +02:00
Simone Bordet 0018c298dc
Merge pull request #4845 from eclipse/jetty-10.0.x-4808-review_httpclient_header_api
Fixes #4808 - Review HttpClient Request header APIs.
2020-05-08 17:52:51 +02:00
olivier lamy c8c341f9b4 fix license header
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-06 07:40:10 +10:00
Joakim Erdfelt eba5028bcf
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-05 10:03:27 -05:00
Simone Bordet cf9df70935 Fixes #4808 - Review HttpClient Request header APIs.
Introduced:
* Request Request.headers(Consumer<HttpFields.Mutable>).
This allows applications to modify the headers, and chain calls.
It also delegates the precise semantic of put/add/remove/clear to HttpFields, so there is no API duplication.
* HttpRequest.header(HttpField) to efficiently add fields while normalizing the request (only used in implementation).

* HttpResponse.header(HttpField) to efficiently add fields while parsing the response (only used in implementation).
This pairs with HttpResponse.trailer(HttpField).
* HttpResponse.headers(Consumer<HttpFields.Mutable>) to modify the fields after they have been populated (only used in tests).

Removed:
* Request.[set,add,put,remove], replaced by headers(Consumer<HttpFields.Mutable>).

Deprecated:
* Request.header(String, String)
* Request.header(HttpHeader, String)
Both replaced by headers(Consumer<HttpFields.Mutable>) with clearer semantic for add/put/remove.

All the rest is code cleanup to remove the usage of the deprecated header() methods.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 23:16:59 +02:00
Simone Bordet 1c22de433b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 19:11:26 +02:00
Joakim Erdfelt d58da0f7d2
Issue #4824 - Addressing flush/commit with GzipHttpOutputInterceptor
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-04 09:22:08 -05:00
Joakim Erdfelt c645d0f7c4
Issue #4835 - Addressing flush/commit with GzipHttpOutputInterceptor
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-01 14:42:08 -05:00
Greg Wilkins 2addb6a655
Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757)
* Use HandlerList instead of HandlerCollection

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

* Use HandlerList instead of HandlerCollection

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-15 18:42:28 +02:00
Simone Bordet 509f5791ff Issue #4765 - Review GzipHandler inside ServletContextHandler.
Restored IncludedGzipTest.
Fixed ServletContextHandler.relinkHandlers(), now excluding
the checks for GzipHandler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-14 12:39:19 +02:00
Simone Bordet 013acca012 Issue #4765 - Review GzipHandler inside ServletContextHandler.
Fixed XML files.
Restored ServletContextHandler.setGzipHandler() and
deprecated it in case it's used from user's XML files.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-14 12:19:52 +02:00
Simone Bordet 1a234dcf4c Issue #4765 - Review GzipHandler inside ServletContextHandler.
Removed GzipHandler from ServletContextHandler.
Updated ServletContextHandlerTest.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-13 14:55:16 +02:00
Joakim Erdfelt 5699b9ff3d Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
Joakim Erdfelt ab228fde9e Updating to version 9.4.28.v20200408 2020-04-08 12:33:56 -05:00
Jan Bartel 3981ec1342 Issue #4758 Fix doc for DefaultServlet.welcomeServlets
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-08 12:27:43 +02:00
Jan Bartel e00560c36d Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-06 11:33:45 +02:00
Jan Bartel 8eb4bb98a4
@RunAs not honoured (#4743)
* Issue #4739 Fix @RunAs

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-06 11:33:09 +02:00
Jan Bartel d0389ed328 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-06 11:31:10 +02:00
Jan Bartel 4b2842265a
Issue #4737 Ensure lifecycle callbacks happen for run-as and non async servlets (#4744)
* Issue #4737 Ensure lifecycle callbacks happen for run-as and non async servlets

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-06 11:30:33 +02:00
Jan Bartel 9726bb88ff Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-06 10:58:44 +02:00
Jan Bartel cf0e3c530f
Issue #4662 Ensure contextDestroyed called after filters and servlets destroyed (#4667)
* Issue #4662 Ensure contextDestroyed called after filters and servlets destroyed

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-06 10:12:19 +02:00
Greg Wilkins ef9e155118
Issue #2074 no merge query string (#4730)
* Issue #4713 Async dispatch with query.

+ Preserve the entire URI with query when startAsync(req,res) is used.
+ merge any query string from dispatch path with either original query or preserved query from forward

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

* Issue #4713 asyncDispatch with query parameters

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

* Issue #2074 Do not merge query strings

Do not merge the query string itself, only the parameter map.
The query string is either the original or replaced by the one from the dispatch.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-31 14:26:25 +02:00
Jan Bartel 3f7d04ff96
Issue #4719 Keep previous charencoding if not set in content type (#4720)
* Issue #4719 Keep previous charencoding if not set in content type

Signed-off-by: Jan Bartel <janb@webtide.com>

* Issue #4719 - Adding unit tests for charset reset/change

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-31 14:24:55 +02:00
Greg Wilkins e3d670d61d
Issue #4713 Async dispatch with query. (#4721)
* Issue #4713 Async dispatch with query.

+ Preserve the entire URI with query when startAsync(req,res) is used.
+ merge any query string from dispatch path with either original query or preserved query from forward

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

* Issue #4713 asyncDispatch with query parameters

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-30 16:23:26 +02:00
Simone Bordet 6ed952a9c0 Merges 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-30 12:49:39 +02:00
Jan Bartel 0a4879e521
Issue #4707 wrong value for ServletContext.setSessionTimeout (#4708)
* Issue #4707 wrong value for ServletContext.setSessionTimeout

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-26 11:13:42 +01:00
Jan Bartel 0c20622648
Issue #4700 ServletContext.createXXX methods should throw UnsupportedOperationException (#4701)
* Issue #4700 ServletContext.createXXX methods should throw UnsupportedOperationException

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-25 11:17:05 +01:00
Jan Bartel 57324f3cca
Issue #4697 ServletContext sessionModes methods should throw UnsupportedOperationException (#4698)
* Issue #4697 ServletContext sessionModes methods should throw UnsupportedOperationException

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-25 11:16:36 +01:00
Simone Bordet e215d071c8 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-23 16:24:04 +01:00
Joakim Erdfelt 43419802b7
Issue #4685 - Declare <scope> for jetty-slf4j-impl everywhere
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 11:12:08 -05:00
Joakim Erdfelt 9492a5379c
Issue #4685 - eliminate <version> in jetty-slf4j-impl
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 10:42:36 -05:00
Simone Bordet f8d9f82eff Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-18 11:40:11 +01:00
Joakim Erdfelt 57604d0955
Issue #4572 - Mechanical Change to use org.slf4j
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 15:48:25 -05:00
Joakim Erdfelt 8b7e64915f
Issue #4572 - Replace Jetty Logging with SLF4J
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
       org.eclipse.jetty.util.log.Logger but as
  simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
  to org.eclipse.jetty.logging.StacklessLogging found in
  the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
  + and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
  + Also adding note to jetty-util classes that are used by
    jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 11:21:54 -05:00
Jan Bartel dfa0e0adf7
Jetty 10.0.x 4507 forwardincludemappings (#4590)
* Issue #4507 Implement forward/include/async params for HttpServletMapping

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-10 11:05:52 +01:00
Jan Bartel dfd3875dbc
Jetty 10.0.x 4506 metadata complete (#4587)
* Issue #4506 Do not introspect annotations on metadata-complete fragments

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-09 15:34:04 +01:00
Simone Bordet 1393c0e92b Issue #4400 - Review HttpClient's ContentProvider.
Introduced Request.Content with a reactive model to provide
request content.
Introduced RequestContentAdapter to wrap ContentProviders
into Request.Content.
Updated implementation to use the reactive model rather than
the old pull model.
Reimplemented all ContentProviders in terms of Request.Content.
Converted most of the tests from ContentProvider to Request.Content.
Updated proxy servlets and documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-28 14:40:48 +01:00
Joakim Erdfelt 8aabb52557 Updating to version 9.4.28-SNAPSHOT 2020-02-27 13:03:44 -06:00
Joakim Erdfelt a304fd9f35 Updating to version 9.4.27.v20200227 2020-02-27 12:21:57 -06:00