Commit Graph

3542 Commits

Author SHA1 Message Date
Joakim Erdfelt ccc863726b
Issue #5133 - Updates based on review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-26 12:19:22 -05:00
gregw b03bdb9db4 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-08-24 18:09:16 +02:00
Greg Wilkins 1159fa399f
Issue #5095 - XmlConfiguration Parser Pool (#5148)
* Issue #5095 XmlConfiguration Parser Pool

Use a pool of parsers rather than a shared static

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

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

* removed fake test

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

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-24 18:00:28 +02:00
Jan Bartel 77779ed6d8
Issue #4996 - Regularlize logging (#5167)
* Issue #4996 Regularize logging

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

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-24 17:15:13 +02:00
Simone Bordet 823e713ee4 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-22 17:35:25 +02:00
Simone Bordet 2d3f0e0c10 Improved logging and toString() implementations,
small refactorings in code and tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-22 17:31:12 +02:00
Joakim Erdfelt b35c4332b2
Issue #5133 - Fixing ResourceCollection(String) when no entries provided.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-20 13:35:48 -05:00
Joakim Erdfelt 5d3711c3c0
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-5133-webappcontext-extraclasspath-cleanup 2020-08-13 11:12:20 -05:00
Simone Bordet ac4ea4550e Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-13 16:52:35 +02:00
Simone Bordet 26c2d34439 Issue #4809 - Set a max number of requests per connection.
Improved Pool.reserve(int) logic to take into account the
fact that an entry can accommodate maxMultiplex acquires.

This reduces connection openings for HTTP/2 in case of
spikes of requests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 16:52:06 +02:00
Joakim Erdfelt 00f4859e33
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 16:04:06 -05:00
Joakim Erdfelt 9b5b43a2fd
Fixing KeyStoreScannerTest
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 15:50:11 -05:00
Joakim Erdfelt 6848403d34
Issue #5133 - Reworking WebAppContext.extraClasspath
+ Reverting name ResourceFactory.newResource(String)
  to .getResource(String)
+ Reintroducing Resource.getResource(String)
+ ResourceHandler.getResource(String) cleaned up
  in light of Exception handling requirement
+ Resource.addPath(String) implementations can
  never return null now

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 13:06:09 -05:00
Joakim Erdfelt 0b0d7d3282
Issue #5133 - Reworking WebAppContext.extraClasspath
+ Now parsed by WebAppContext into List<Resource>
+ Reintroduced Resource.fromList
+ Refactored ResourceFactory to never return null
  and always throw an exception if unable to
  get/create/resolve the Resource

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 12:50:02 -05:00
Joakim Erdfelt ccdd20b7bc
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-12 10:27:33 -05:00
Joakim Erdfelt e632d2454b
Merge pull request #5131 from eclipse/jetty-9.4.x-5129-extraclasspath-glob
Issue #5129 - WebAppContext.setExtraClasspath(String) cleanup
2020-08-12 10:08:53 -05:00
Simone Bordet ae713d65d9 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-12 16:17:06 +02:00
Simone Bordet 4a0af046b8 Closes #4809 - Set a max number of requests per connection.
Implemented as part of #4975.

Added a test case that proves that the connection is closed
when the max usage count is reached.

Improved logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-12 16:14:51 +02:00
gregw cd42fd1635 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-08-12 11:42:36 +02:00
Greg Wilkins 25e3f1c1e0
Pool class refinements (#5117)
* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-12 11:27:25 +02:00
Simone Bordet 16cd552995 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-11 21:00:43 +02:00
Simone Bordet f73b282050
Merge pull request #5128 from eclipse/jetty-9.4.x-5079-ipv6_brackets
Fixes #5079 - :authority header for IPv6 address not having square br…
2020-08-11 20:04:46 +02:00
Joakim Erdfelt 4a19ef4bb2 Issue #5129 - disabling ResourceTest.testGlobPath on WINDOWS for stability 2020-08-11 08:51:04 -05:00
Joakim Erdfelt 150dc22f0a
Issue #5129 - Reverting Resource.fromReferences()
+ Will migrate to jetty-10.0.x

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-11 08:15:27 -05:00
olivier lamy c198d26e6b Updating to version 10.0.0-SNAPSHOT 2020-08-11 16:47:55 +08:00
olivier lamy 429b091578 Updating to version 10.0.0.beta1 2020-08-11 16:47:54 +08:00
Joakim Erdfelt 5b8c343a2b
Issue #5129 - Fleshing out glob testcase a bit more
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 14:46:32 -05:00
Joakim Erdfelt 52f5218900
Issue #5129 - Resource.fromReferences no longer needs DefaultFactory
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 14:42:02 -05:00
Joakim Erdfelt e8098986e6
Issue #5129 - Simplify Resource reference list behavior
+ Introduce new Resource.fromReferences to help with
  parsing delimited resource reference lists.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 11:30:39 -05:00
Joakim Erdfelt 55f4e4fa63
Issue #5129 - WebAppContext.setExtraClasspath(String) cleanup
+ More tests for both relative and absolute path references
+ More testing that will trigger quirks on Windows builds
  so that we can catch regressions faster
+ Reworked WebInfConfiguration to be glob aware in a way
  similar to how WebAppClassLoader behaves.
+ Reworked Resource.newResource(String) to delegate
  canonical path resolution to PathResource
+ Guarded PathResource's usage of Path.toAbsolutePath()
  to ignore valid conditions where the Path cannot be
  resolved to an absolute path (yet)
+ Normalize resolved paths in PathResource

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 10:42:38 -05:00
Joakim Erdfelt 4957c091d0
Correct typo
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-10 10:40:56 -05:00
Simone Bordet d53d9d8a1d Fixes #5079 - :authority header for IPv6 address not having square brackets.
On the client:
* Origin.Address.host is passed through HostPort.normalizeHost(),
so that if it is IPv6 is bracketed.
Now the ipv6 address passed to an `HttClient` request is bracketed.
* HttpRequest was de-bracketing the host, but now it does not anymore.

On the server:
* Request.getLocalAddr(), getLocalName(), getRemoteAddr(),
getRemoteHost(), getServerName(), when dealing with an IPv6 address,
return it bracketed.
The reason to return bracketed IPv6 also from *Addr() methods is that
if it is used with InetAddress/InetSocketAddress it still works, but
often it is interpreted as a URI host so brackets are necessary.
* DoSFilter was blindly bracketing - now it does not.

Added a number of test cases, and fixed those that expected
non-bracketed IPv6.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-07 15:53:19 +02:00
Simone Bordet c49035570e Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-convert_synchronized_to_autolock'. 2020-08-04 16:32:55 +02:00
Simone Bordet edd6ca2ee1 Issue #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-04 15:43:39 +02:00
Simone Bordet fe56838b63 Fixed copyright headers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-31 19:18:07 +02:00
Simone Bordet 55f51fa0b5 Fixed copyright headers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-31 19:01:59 +02:00
Simone Bordet d2df0fc2e9 Fixes after review of #4975.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-31 17:59:55 +02:00
Simone Bordet 2fe01626a5 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-31 17:47:37 +02:00
Ludovic Orban e9dad975e6 Re-implement HTTP connection pooling with a non-queuing algorithm
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-07-31 10:36:43 +02:00
Greg Wilkins 66ec16006e
Issue #5088 Review ContextHandler locking (#5094)
* Issue #5088 Review ContextHandler locking

The locking was primarily as a memory guard for the availability status, which was already volatile.
Have instead using an AtomicReference with a simple state machine layered on top of start/stop lifecycle.
There was also protection for AttributesMap, which is no longer needed as AttributesMap is now concurrent.

* Issue #5088

updates from review

* Issue #5088

updates from review (better this time)
2020-07-30 17:58:34 +02:00
Greg Wilkins 7adbf247ec
Issue #5093 Static UrlEncoded (#5098)
* Issue #5093 Static UrlEncoded

Updated UrlEncoded to static only class with no synchronization

* Fixed additional tests

* fixed formatting

Signed-off-by: gregw <gregw@webtide.com>
2020-07-30 17:57:38 +02:00
Joakim Erdfelt 36b42ca65d
Issue #3916 - Fix whitespace between boundary and part headers
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-07-30 09:13:01 -05:00
Simone Bordet 089e51f0bc Fixes #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-29 15:34:01 +02:00
Lachlan Roberts 1be0220988 Issue #4919 - make the SessionTracker the one to implement Graceful shutdown
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-28 17:38:41 +10:00
Simone Bordet 8d69fc41a7 Fixes #5083 - Convert synchronized usages to AutoLock.
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 23:14:05 +02:00
Joakim Erdfelt fe9deae849 Updating to version 9.4.32-SNAPSHOT 2020-07-23 13:53:47 -05:00
Joakim Erdfelt 450ba27947 Updating to version 9.4.31.v20200723 2020-07-23 12:46:54 -05:00
Lachlan Roberts 9f3864af7e Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-23 18:08:20 +10:00
Lachlan Roberts 38a94879f9 Issue #5062 - KeyStoreScannerTest should use manual scanning to avoid timing issues
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-21 11:31:40 +10:00
Lachlan Roberts ef60808bae fix licence headers and imports from merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-16 09:27:46 +10:00
Lachlan Roberts f0f153cc97 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-16 09:10:07 +10:00
Lachlan bbb0f6617c
Merge pull request #5042 from eclipse/jetty-9.4.x-5019-SslReload
Issue #5019 - hot-reload SSL certificates if keystore file changed
2020-07-16 09:09:03 +10:00
Lachlan Roberts c09e4d6f86 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-16 08:46:29 +10:00
Lachlan 42ea202858
Merge pull request #5047 from eclipse/jetty-9.4.x-moduleCommentDoNotEdit
the "DO NOT EDIT" comment in .mod files should start with '#'
2020-07-16 08:43:00 +10:00
Lachlan Roberts 0f7d99c3bf add documentation for ssl-reload, change exception message in SslContextFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 19:01:15 +10:00
gregw eb1e0b6d51 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-15 10:52:57 +02:00
Sergey Tselovalnikov 6b57654b03
Avoid large allocations of temporary buffers in BuferUtil (#5045)
* Avoid large allocations of tmp buffers in buferutil

Signed-off-by: Sergey Tselovalnikov <sergeicelov@gmail.com>

* review feedback

Signed-off-by: Sergey Tselovalnikov <sergeicelov@gmail.com>
2020-07-15 10:07:27 +02:00
Lachlan Roberts de1b6745c5 the DO NOT EDIT comment in .mod files should start with '#'
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 16:47:22 +10:00
Lachlan Roberts c40ba69222 add null checks in SslContextFactory for _factory, which could be null if reload failed
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 15:35:22 +10:00
Lachlan Roberts 2541f1f648 add javadoc for KeyStoreScanner class
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 11:20:57 +10:00
Jan Bartel 3b9def69bc Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-14 14:11:15 +02:00
Jan Bartel b1e08ba4e0
Issue #5020 Make servlets,filters,listeners beans again (#5028)
* Issue #5020 Make servlets,filters,listeners beans again

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-07-14 11:20:20 +02:00
Lachlan Roberts a83844df32 changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-14 16:10:07 +10:00
Lachlan Roberts 62ee077b79 move code of ssl-reload module to jetty-util, move module files to jetty-server
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-13 23:11:09 +10:00
olivier lamy eefe3d202b revert fail release
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-07-10 15:04:22 +10:00
olivier lamy 9619a5a743 Updating to version 10.0.0.beta1 2020-07-10 14:23:28 +10:00
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
Simone Bordet 383061a695 Merged 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-02 09:29:03 +02:00
Zac Duncan c77ad80d94 add constructor that takes in all params that super needs.
Signed-off-by: Zac Duncan <zac.duncan@gmail.com>
2020-07-02 09:28:09 +02: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
Lachlan Roberts 423777ed02 fix AbstractThreadPoolTest from merge from 9.4.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-27 19:35:38 +10:00
Greg Wilkins b8c7a9509a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-27 10:11:51 +02:00
Joakim Erdfelt 051e102122
Merge remote-tracking branch 'origin/release-9.4.29' into jetty-9.4.x 2020-05-25 08:43:41 -05:00
Lachlan 4611379c86
Merge pull request #4882 from eclipse/jetty-9.4.x-4873-ExecutorThreadPoolJoin
Issue #4873 - fix timeout on ExecutorThreadPool.join()
2020-05-25 14:07:28 +10:00
Lachlan Roberts 74f9b464a6 Issue #4873 - generalize test for all ThreadPools
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-22 10:49:42 +10: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
Simone Bordet 3af43c8ac3 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-21 18:36:36 +02:00
Greg Wilkins b9466823c8 Issue #4892 Async JSON
Handle encoded cached strings (or not).

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-21 11:44:30 +02:00
Lachlan Roberts ae0b70fbfc Issue #4873 - add test to reproduce the ExecutorThreadPool.join() issue
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-20 00:45:05 +10:00
Lachlan Roberts 590b1a6ab1 Issue #4873 - fix timeout on ExecutorThreadPool.join()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-18 11:49:12 +10:00
Lachlan Roberts ccaca1892e Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-14 13:37:13 +10:00
Lachlan Roberts 9f39fd1dd1 Issue #4861 - reduce garbage created by the async request attributes
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-12 18:28:23 +10:00
Simone Bordet 63bfb43b2f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-08 15:23:00 +02:00
Lachlan 908331acbd
Add jetty to ShutdownThread name. 2020-05-08 18:46:09 +10:00
Lachlan Roberts bb967cb841 Issue #4789 - Name the ShutdownThread
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-08 15:07:27 +10:00
Olivier Lamy 78992a126c
Start a mongo instance for testing using docker via java code (#4840)
* remove slow mongo maven plugin which was forking an external process and now run mongodb in a container so we can even now test with different version using -Dmongo.docker.version

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-08 07:06:03 +10:00
Simone Bordet 66d78b2059 Issue #4778 - Enforcing SNI when there are only non-wildcards certificates.
Fixed test case after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 17:13:51 +02:00
Simone Bordet 99ecfca439 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-04 13:00:15 +02:00
Simone Bordet 2fa161c515
Merge pull request #4790 from eclipse/jetty-9.4.x-4778-sni_with_one_certificate
Fixes #4778 - Enforcing SNI when there are only non-wildcards certifi…
2020-05-04 11:35:04 +02:00
Greg Wilkins eacb79f4e7 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 10:29:41 +02:00
Greg Wilkins 8fcbf6d590
Improve Attributes Handling (#4816)
* Spun out from #4814 Improve Attributes Handling

Improve attribute handling to reduce garbage and improve lookup.
Introduced a Wrapper so that request can remove any layers on reset.

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

* Issue #4814 - Exposing AttributeMap.getAttributeNameSet() on Attributes.

The underlying AttributesMap already has a .getAttributeNameSet()
method, expose it on the Attributes interface.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Allow a set to override a secure attribute.

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

* Issue #4814 - Attributes.getAttributeNames() is now defaulted

The Attributes.getAttributeNames() will use the
.getAttributeNameSet() by default now.

Updated all Attributes.Wrapper impls to use this new behavior

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-04-28 10:16:29 +02:00
Simone Bordet 426c80bf6d Fixes #4778 - Enforcing SNI when there are only non-wildcards certificates.
If SNI is required, wrap the KeyManagers with SniX509ExtendedKeyManager.
Updated the main keystore file to only have one certificate (instead of two),
since there never was the need for two certificates in the tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-18 18:15:03 +02:00
Greg Wilkins 6694f94cd5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-15 18:50:19 +02:00
Lachlan 4388c376ba
Merge pull request #4704 from eclipse/jetty-9.4.x-4235-OpenIdErrors
Issue #4235 - communicate reason of OpenID auth failure to error page
2020-04-15 09:42:06 +10:00
Lachlan Roberts 0de5976651 Issue 4235 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-04-14 21:34:26 +10: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
Michael Mayer 9079fa63b3
Improve keystore exception message when keystore is not valid (#4759)
Signed-off-by: Michael Mayer <michael@schnittstabil.de>
2020-04-08 10:13:10 -05:00
Michael Mayer a640701d78
Improve keystore exception message when keystore is not valid (#4759)
Signed-off-by: Michael Mayer <michael@schnittstabil.de>
2020-04-08 15:36:52 +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
Lachlan af899b0e68
Merge pull request #4602 from eclipse/jetty-10.0.x-4340-ServiceLoader
Issue #4340 - Continue after ServiceLoader ServiceConfigurationError
2020-03-25 10:30:38 +11:00
Lachlan Roberts 4bc32e314b Issue #4235 - communicate reason of OpenID auth failure to error page
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-24 21:36:41 +11:00
Chris Walker da3bd1da8b Merge branch 'jetty-9.4.x' into jetty-10.0.x
# Conflicts:
#	jetty-documentation/src/main/asciidoc/development/frameworks/weld.adoc
#	jetty-http/src/test/java/org/eclipse/jetty/http/MultiPartFormInputStreamTest.java
2020-03-20 14:30:22 -05:00
Joakim Erdfelt 7e0fff9a89
Merge pull request #4686 from eclipse/jetty-10.0.x-4685-slf4j-impl-not-included
Issue #4685 - jetty-slf4j-impl not a compile/runtime dependency.
2020-03-20 12:04:32 -05: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 2c600f2b68
Issue #4685 - Mark jetty-slf4j-impl as test scope by default
+ Update logging in test-hazelcast-sessions
+ Update logging in test-infinispan-sessions

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 09:55:15 -05:00
Lachlan Roberts 04cecaaaef Issue #4340 - Change usages to more closely follow previous behaviours
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-20 17:02:49 +11:00
Joakim Erdfelt a16abe1693
Issue #4685 - jetty-slf4j-impl not a compile/runtime dependency.
+ Mark as a test dependency

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-19 17:46:41 -05:00
Simone Bordet 2940eb8ab5 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4382-h1_to_h2_upgrade'. 2020-03-18 11:44:06 +01:00
Lachlan Roberts c658ae7056 Issue #4673 - fix MultiPart parsing for content split in boundary
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-18 11:22:40 +11:00
Lachlan Roberts 9363a3c39a Issue #4340 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-17 15:14:52 +11:00
Lachlan Roberts 30d36ed68c Merge branch jetty-10.0.x into jetty-10.0.x-4340-ServiceLoader
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-17 15:00:30 +11: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
Greg Wilkins ca74fbeb32 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-03-16 10:23:58 +01:00
Lachlan Roberts 7af220dade Issue #4340 - shortcut method for the serviceStream
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-16 09:42:32 +11:00
Simone Bordet 466517a0e8 Issue #4382 - Support HTTP/1 upgrade to HTTP/2 in HttpClient.
* Moved implementation of UpgradeTo from HTTP2ServerConnection
  to HTTP2Connection, since now also the client connection
  can be upgraded to.
* Split HTTP2Session.newStream(), since now the client must
  be able to create the implicit stream 1 corresponding to
  the HTTP/1.1 upgrade request, so that the HTTP/2 response
  after the upgrade finds the stream.
* The HTTP/1.1 upgrade mechanism has been generalized.
  Before it was based on HttpConnectionUpgrader and a hook
  in HttpChannelOverHTTP.exchangeTerminating().
  Now it is based on UpgradeProtocolHandler that when sees
  a 101 response it will trigger the upgrade mechanism.
* Introduced ConnectionPool.accept(Connection) to transfer
  a connection from the HTTP/1.1 connection pool to the
  HTTP/2 connection pool after the upgrade.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-13 15:59:13 +01:00
Lachlan Roberts a6b2b3ff98 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4340-ServiceLoader
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-13 17:02:26 +11:00
Lachlan Roberts edd671146d Issue #4340 - ServiceLoader stream which doesn't break if hasNext throws
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-13 16:59:33 +11:00
Lachlan Roberts dbd89ce1c7 Issue #4645 - validate port range & return 400 on bad forwarded headers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-11 18:31:25 +11:00
Lachlan Roberts fef25e7825 Merge branch jetty-10.0.x into jetty-10.0.x-4538-MessageReaderWriter 2020-03-11 14:23:47 +11: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
olivier lamy 1c4a21c9be Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-03-09 14:28:53 +10:00
Joakim Erdfelt f2a4c6b615
Issue #4620 - Better support for alt PrintStream in StdErrLog
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-02 12:03:37 -06:00
Lachlan Roberts 355d21317b Issue #4340 - Changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-02 10:16:38 +11:00
Lachlan 6151fc0c36
Merge pull request #4615 from eclipse/jetty-10.0.x-4598-InetAccessHandler
Issue #4598 - rework InetAccessHandler to use path mappings
2020-03-01 18:43:32 +11:00
Lachlan Roberts 97c55e27cc Issue #4340 - remove TypeUtil.load and use flatMap() on streams instead
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-29 11:06:32 +11:00
Lachlan Roberts 6832912d49 Issue #4340 - Implement TypeUtil.load(ServiceLoader) with Streams
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-28 12:15:27 +11: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
Simone Bordet a2a75e8ecc Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-27 13:31:18 +01:00
Simone Bordet 75893dac9c Fixes #4612 - ReservedThreadExecutor hangs when the last reserved thread idles out.
Explicitly removing the idled out thread from the stack,
rather than calling tryExecute().
Side benefit is that we are now removing idled out threads
that are least recently used.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-27 13:26:53 +01:00
Lachlan Roberts ccd6c845e5 Merge remote-tracking branch 'origin/jetty-9.4.x-4598-InetAccessHandler' into jetty-10.0.x-4598-InetAccessHandler 2020-02-27 19:34:16 +11:00
Lachlan Roberts 2edc4920fd Issue #4598 - fix InetAccessHandlerTest expectations to fit new behavior
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-27 18:29:29 +11:00
Lachlan Roberts 3c551e960c Issue #4598 - rework InetAccessHandler to use only one IncludeExcludeSet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-27 15:41:35 +11:00
Greg Wilkins 277ce5f3a5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-02-26 14:36:22 +01:00
Joakim Erdfelt d082e54301
Issue #4606 - fixing formatTick use of `now`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-26 07:01:53 -06:00
Lachlan Roberts 67e88abbe9 Issue #4340 - loadFirst can take a predicate to match a service provider
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-26 10:35:31 +11:00
Lachlan Roberts a277c30b81 Issue #4340 - Move ServiceLoaderUtil.load method to TypeUtil.loadAll
- increase MAX_ERRORS to 1000
- introduce a loadFirst method

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-26 10:26:29 +11:00
Lachlan Roberts a7f4d2606b Issue #4340 - always pass in ServiceLoader to ServiceLoaderUtil
this prevents errors where jetty-util must declare it uses the provider
class in module.info

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-25 19:49:23 +11:00
Lachlan Roberts 81424f1f44 Issue #4340 - Continuing after ServiceLoader ServiceConfigurationError
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-25 19:49:22 +11:00
Lachlan Roberts bb7e48043d Issue #4598 - Add URI mapping to InetAccessHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-25 14:58:48 +11:00
Joakim Erdfelt 0e536407a9
Issue #4567 - Backport of StdErrLog 10.0.x for Throwable behavior change
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-20 13:45:40 -06:00
Joakim Erdfelt e894da5b21
Fixing noinspection warning
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-20 13:42:53 -06:00
Joakim Erdfelt 8594fd371e
Removing @SuppressWarnings
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-20 13:39:01 -06:00
Joakim Erdfelt d453333a48
Issue #4567 - Backport of StdErrLog 10.0.x for Throwable behavior change
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-20 12:57:49 -06:00
Joakim Erdfelt 3c6c9112de
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4567-StdErrLog-throwable 2020-02-20 11:16:19 -06:00
Joakim Erdfelt 16230e6e1c
Issue #4567 - Applying fixes from PR #4570 review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-20 10:31:59 -06:00
Joakim Erdfelt 5df8b05327
Issue #4567 - null arguments on StdErrLog result in no output (avoiding "null")
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-19 15:10:20 -06:00
Lachlan Roberts 5c839d791d Issue #4538 - allow MessageInputStream not to read to EOF
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-19 19:31:26 +11:00
Joakim Erdfelt c9134df60a
Issue #4567 - Applying changes from PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-18 11:09:46 -06:00
Lachlan Roberts 55748f12c2 Issue #4581 - remove unnecessary javadoc on Override methods
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-18 11:33:56 +11:00
Simone Bordet 6f211d7a34 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-16 17:29:10 +01:00
Greg Wilkins ab5005b9f7 Fixes #4575 Stopping Reserved Thread
Fixes #4575 Stopping Reserved Thread by removing the `isRunning` check
from `reservedWait`.  The main run loop is also simplified to improve
`isRunning` checks before the thread is put on the stack.  Javadoc
improved to explain each step.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-16 09:43:31 +01:00
Joakim Erdfelt 3f3eaf2182
Issue #4567 - StdErrLog cleanup and final Arg Throwable support
Checkstyle fixes ...
+ Log.__loggers now Log.LOGGERS
+ Log.__props now Log.PROPS
+ StdErrLog.__tagpad now StdErrLog.THREADNAME_PADDING
+ StdErrLog.__source now StdErrLog.SOURCE
+ StdErrLog.__long now StdErrLog.LONG_CLASSNAMES
+ StdErrLog.__escape now StdErrLog.ESCAPE_CONTROL_CHARS
+ Removed redundant "public" modifier on Log interface methods

New code ...
+ New Log.getProperty(String key, String defaultValue)
  Used by JavaUtilLog, JettyLogHandler, and StdErrLog
+ New StdErrLog.getConfiguredLevel()
+ New StrErrLog.println(String) used to write StringBuilder
  to configured PrintStream

Removed code ...
+ Removed deprecated prop check in StdErrLog initialization

Cleanup and Corrected code ...
+ StdErrLog.setDebugEnabled(boolean) cleanup
+ StdErrLog._stderr is now used and is never null
+ Only one StdErrLog.format() method entry point
+ StdErrLog.format(StringBuilder, Throwable) now called .formatCause(StringBuilder, Throwable, String)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-13 13:00:24 -06:00
Joakim Erdfelt e363997432
Issue #3924 - Remove Resource.writeTo()
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-07 12:21:23 -06:00
Simone Bordet 4fbbaf8b8e Fixes #3953 - Client configuration for direct/heap ByteBuffers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-05 09:49:44 +01:00
Jan Bartel fe8b11dd48 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-02-01 11:27:09 +01:00
Greg Wilkins 4dbf8a3a9e
Issue #4495 ReservedThreadExecutor optimise (#4499)
* Issue #4495 ReservedThreadExecutor optimise

Use synchronousQueue for task handoff

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

* Issue #4495 ReservedThreadExecutor optimise

updates from review

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

* Issue #4495 ReservedThreadExecutor optimise

Use a linked queue rather than a deque(as a stack).  This should be simpler, better optimised and less contended.  Idling has been simplified so that a reserve thread is always dropped every idle period.

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

* Issue #4495 ReservedThreadExecutor optimise

reverted RTE and added a JMH benchmark

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

* More variants and longer tests

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

* Added LQ

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

* removed SQ2

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

* Issue #4495 ReservedThreadExecutor optimise

Replaced real implementation with SQ

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

* Issue #4495 RTE optimise

Removed alternate implementations

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

* Issue #4495 RTE optimise

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-31 19:54:44 +01:00
Simone Bordet ce6e146ac1
Merge pull request #4489 from eclipse/jetty-10.0.x-2643-pkcs12_keystores
Fixes #2643 - Switch SslContextFactory.keystoreType from JKS to PKCS12.
2020-01-30 19:28:49 +01:00
Greg Wilkins 5aaec6e23f
Issue #4321 Refactored Graceful shutdown (#4482)
* Issue #4321 Refactored Graceful shutdown

removed stopTimeout from all abstractLifeCycles.  It is on Graceful.LifeCycle, which is only implemented by components that can start a graceful shutdown (eg Server, ContextHandler and QueuedThreadPool)

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

* Issue #4321 Refactored Graceful shutdown

cleanup after review

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

* Issue #4321 Refactored Graceful shutdown

reinstate other stop tests (more work to do).

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

* Issue #4321 Refactored Graceful shutdown

Fixes for stop test by improving LocalConnector shutdown handling

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

* Issue #4321 Refactored Graceful shutdown

Removed broken test on LocalConnector that is already tested in GracefulStopTest

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

* Issue #4321 Refactored Graceful shutdown

Fixed all stop tests

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

* Issue #4321 Refactored Graceful shutdown

fixed checkstyle

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

* Issue #4321 Refactored Graceful shutdown

No stopTimeout JMX attribute

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

* Issue #4321 Refactored Graceful shutdown

Dump stopTimeout
test with default stopTimeout

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

* Issue #4321 Refactored Graceful shutdown

USe sendError for 503

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

* Issue #4321 Refactored Graceful shutdown

minor cleanups

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

* Issue #4321 Refactored Graceful shutdown

Simplifications after review

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

* Issue #4321 Refactored Graceful shutdown

after review

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

* Issue #4321 Refactored Graceful shutdown

after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-30 17:05:03 +01:00
Lachlan Roberts fdd27a9f28 Issue #4502 - add onClose tests for Jetty and Javax WS APIs
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-29 15:20:36 +11:00
Lachlan f6fd3c41a5
Issue #4462 - Prevent jetty 10 WebSocket close deadlocks (#4472)
- Replicate problems from WS close deadlock with test cases
- use FutureCallback instead of SharedBlockingCallback for WS blocking methods
- add timeout to the blocking callbacks for WS for (idleTimeout + 1000ms)
- Core throws ClosedChannelException instead of ISE if send after closed
2020-01-29 09:15:40 +11:00
Joakim Erdfelt 56fc476d55 Updating to version 9.4.27-SNAPSHOT 2020-01-17 07:00:10 -06:00
Joakim Erdfelt 7b38981d25 Updating to version 9.4.26.v20200117 2020-01-17 06:21:47 -06:00
Simone Bordet d60b4459bf Fixes #2643 - Switch SslContextFactory.keystoreType from JKS to PKCS12.
Updated old keystores to new PKCS12 keystores.
Removed unused keystores and truststores.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-17 09:48:51 +01:00
Simone Bordet 65d50258b7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-17 09:02:14 +01:00
Joakim Erdfelt 19e91a6a40
Issue #4483 - Cleanup of InetAddressSetTest (#4484)
* More resiliency on bad DNS servers

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-16 14:05:11 -06:00
Joakim Erdfelt 01a5974f4b
Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	Jenkinsfile
#	examples/async-rest/async-rest-webapp/src/test/java/org/eclipse/jetty/example/asyncrest/DemoServer.java
#	jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/MultiPartParserTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/matchers/HttpFieldsMatchersTest.java
#	jetty-maven-plugin/src/test/java/org/eclipse/jetty/maven/plugin/it/TestGetContent.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterLenientTest.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterTest.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java
#	jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletLifeCycleTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipContentLengthTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultNoRecompressTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/servlets/MultipartFilterTest.java
#	jetty-unixsocket/src/test/java/org/eclipse/jetty/unixsocket/UnixSocketClient.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/B64CodeTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java
#	jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClasspathPatternTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/LargeMessageTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerGoodSignaturesTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerInvalidSignaturesTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadataSetTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/utils/ReflectUtilsTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ConfiguratorTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/RestartContextTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerGoodSignaturesTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerInvalidSignaturesTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/ErrorCloseTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientConnectTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientSessionsTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/WebSocketClientTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/PartialListenerTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfigTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilQuoteTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ConnectionManagerTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/TomcatServerQuirksTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/WebSocketClientInitTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/GeneratorTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/TextPayloadParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase11.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase12.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase2.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase4.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase73.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventDriverTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedScannerTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulatorTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtensionTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/ConnectionStateTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/http/HttpResponseHeaderParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageDebug.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/Utf8CharBufferTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/UnitGenerator.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/util/Utf8PartialBuilderTest.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/RedirectWebSocketClientTest.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase1.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase2.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase4.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase5.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6BadUTF.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6GoodUTF.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7BadStatusCodes.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7GoodStatusCodes.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase9.java
#	pom.xml
#	tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationsTest.java
#	tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java
#	tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java
#	tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java
2020-01-15 12:20:20 -06:00
Joakim Erdfelt 8c65309963
Addressing Checkstyle violations in src/test/java
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-14 12:33:34 -06:00
Joakim Erdfelt 1f8ad08281
Fixing Checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-09 15:56:06 -06:00
Simone Bordet 5f82e17d2f Issue #3578 - Adopt EPL-2.0 for Jetty-10.
WIP: updated copyright headers for Java files.

TODO: doc files and META-INF files inside jars.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-09 20:10:19 +01:00
Simone Bordet a5c99207fc Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-07 17:02:40 +01:00
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 ff48fba585 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:59:21 +01: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
Jesse Glick bc338e7c88
Reduce log level of message
Signed-off-by: Jesse Glick <jglick@cloudbees.com>
2019-12-19 15:43:19 -05:00
Simone Bordet e3bb5a7515 Issue #4225 - Fix JPMS transitivity.
Reworked all module-info.java files to take into
account JPMS transitivity.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 18:17:35 +01:00
Simone Bordet 133dbdf7fe Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-19 12:02:24 +01:00
Simone Bordet 26b0445a9e Fixed visibility of Scanner.Visitor.
Must be package private because it uses TimeNSize
in method signatures, that is also package private.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 11:53:20 +01:00
Greg Wilkins d971716e6d Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-19 12:33:28 +11:00
Greg Wilkins c5acf96506
Jetty 9.4.x 4331 async close complete3 (#4409)
* Issue #4376 Async Content Complete

Added test harness to reproduce unready completing write.
Fixed test by not closing output prior to becoming READY

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

* Issue #4331 Async Write Complete

Test harness to reproduce unready when closing/completing.

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

* Issue #4331 Async Write Complete

test both PENDING and UNREADY

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

* Issue #4331 Async Write Complete

test cleanups

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

* Issue #4331 Async Close Complete

Cleanups of write

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

* WIP

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

* Issue #4331 Close Complete

Work in progress

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

* Issue #4331 Close Complete

Added async close to HttpWriter and ResponseWriter
Always use async close, with blocker if necessary.

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

* Issue #4331 Close Complete

Working async close complete!

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

* Issue #4331 Close Complete

invert test as we can now call complete when not ready!

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

* Issue #4331 Close Complete

fixed transition to ERROR state

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

* Issue #4331 Close Complete

async close after onError

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

* Issue #4331 Close Complete

minor cleanups

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

* Issue #4331 Close Complete

Fix for proxy tests

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

* Issue #4331 Close Complete

Fix write loop to handle clear of p=0,l=0 rather than p=l

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

* Issue #4331 Close Complete

Removed old close on all content mechanism
Cleanups and some more TODOs

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

* Issue #4331 Close Complete

a reworking of HttpOutput to separate out API state.

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

* Issue #4331 Close Complete

Soft close for Dispatcher
release buffer in onWriteComplete

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

* Issue #4331 Close Complete

Set _onError in onWriteComplete
NOOP callback instead of null

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

* Issue #4331 Close Complete

failure closes HttpOutput

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

* Issue #4331 Close Complete

Moved closedCallback handling to onWriteComplete

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

* Issue #4331 Close Complete

Additional test of complete during blocking write.

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

* Issue #4331 Close Complete

reimplemented blocking close to sometimes be async

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

* Issue #4331 Close Complete

ascii "art"

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

* Issue #4331 Close Complete

Code cleanup.  Use a CLOSE state rather than non null closedCallback to be clearer that it is a state.
Renamed close(Callback) to complete(Callback)
Renamed and simplified closed() to completed()

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

* Issue #4331 Close Complete

Do not dispatch
Better ascii art
improved close impl to be similar to complete

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

* Issue #4331 Close Complete

More test cases

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

* Issue #4331 Close Complete

retain execute behaviour in 9.4. review in 10.

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

* Improved javadoc and ascii art

* Improved CLOSING

Switch to CLOSING state as soon as last write is done, even if several non last channelWrites will be done.   This allows a subsequent call to close to know that nothing needs to be written and can avoid some EOF exceptions. Now onWriteComplete acts only on the passed in last parameter.

Added test for sendContent

* WIP

Aggregate within lock
pipeline test debug

* Avoid creating ignored exception when Idle or Failed.

* Try a parse without fill to avoid unconsumed input debug

* fixed pipeline size

* release buffer before callback

* turn off debug

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

* Issue #4331 Close Complete

Better javadoc
refactored onWriteComplete logic to be simpler
fixed bug with flush of last written byte

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

* Issue #4331 Close Complete

Completely reworked test harness for better coverage.

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

* Issue #4331 Close Complete

Reworked order of ifs to match logic above in onWriteComplete

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-19 12:17:11 +11:00
Simone Bordet 941ce67e61 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-07 14:20:38 +01:00
Joakim Erdfelt 53073ca257
Issue #4385 - Reverting WARN log in favor of IllegalStateException
+ Plus fleshing out the testcases more for Base / Client / Server
  with and without certificates that will trigger SNI requirement
  and ISE.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-06 13:20:24 -06:00
Joakim Erdfelt d1376c71eb
Issue #4385 - Correcting exception variable name.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-02 16:02:18 -06:00
Joakim Erdfelt 65738e770f
Issue #4385 - Fixing client testcase assertion
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-02 16:00:37 -06:00
Joakim Erdfelt 5b1f9d5f15
Issue #4385 - Client no longer needs override.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-02 12:15:02 -06:00
Joakim Erdfelt 816e34bddf
Issue #4385 - Base Class usage now is a WARN logging event in SNI usage
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-02 12:13:13 -06:00
Joakim Erdfelt e1d64af578
Issue #4385 - Minimize impact of deprecated SNI mode on base class
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-02 12:00:21 -06:00
Joakim Erdfelt 666ee4ef60
Issue #4385 - Remove UnsupportedOperationException in SslContextFactory
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-02 10:57:15 -06:00
Jan Bartel cfd21864cf
Issue #4350 Remove exclude of MultiInputStreamParser from jetty-util osgi (#4356)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-27 11:45:33 +11:00
Joakim Erdfelt 2777229867
Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	VERSION.txt
#	aggregates/jetty-all-compact3/pom.xml
#	aggregates/jetty-all/pom.xml
#	apache-jsp/pom.xml
#	apache-jstl/pom.xml
#	build-resources/pom.xml
#	examples/async-rest/async-rest-jar/pom.xml
#	examples/async-rest/async-rest-webapp/pom.xml
#	examples/async-rest/pom.xml
#	examples/embedded/pom.xml
#	examples/pom.xml
#	jetty-alpn/jetty-alpn-client/pom.xml
#	jetty-alpn/jetty-alpn-conscrypt-client/pom.xml
#	jetty-alpn/jetty-alpn-conscrypt-server/pom.xml
#	jetty-alpn/jetty-alpn-java-client/pom.xml
#	jetty-alpn/jetty-alpn-java-server/pom.xml
#	jetty-alpn/jetty-alpn-openjdk8-client/pom.xml
#	jetty-alpn/jetty-alpn-openjdk8-server/pom.xml
#	jetty-alpn/jetty-alpn-server/pom.xml
#	jetty-alpn/pom.xml
#	jetty-annotations/pom.xml
#	jetty-ant/pom.xml
#	jetty-bom/pom.xml
#	jetty-cdi/pom.xml
#	jetty-client/pom.xml
#	jetty-continuation/pom.xml
#	jetty-deploy/pom.xml
#	jetty-distribution/pom.xml
#	jetty-documentation/pom.xml
#	jetty-fcgi/fcgi-client/pom.xml
#	jetty-fcgi/fcgi-server/pom.xml
#	jetty-fcgi/pom.xml
#	jetty-gcloud/jetty-gcloud-session-manager/pom.xml
#	jetty-gcloud/pom.xml
#	jetty-hazelcast/pom.xml
#	jetty-home/pom.xml
#	jetty-http-spi/pom.xml
#	jetty-http/pom.xml
#	jetty-http2/http2-alpn-tests/pom.xml
#	jetty-http2/http2-client/pom.xml
#	jetty-http2/http2-common/pom.xml
#	jetty-http2/http2-hpack/pom.xml
#	jetty-http2/http2-http-client-transport/pom.xml
#	jetty-http2/http2-server/pom.xml
#	jetty-http2/pom.xml
#	jetty-infinispan/infinispan-common/pom.xml
#	jetty-infinispan/infinispan-embedded-query/pom.xml
#	jetty-infinispan/infinispan-embedded/pom.xml
#	jetty-infinispan/infinispan-remote-query/pom.xml
#	jetty-infinispan/infinispan-remote/pom.xml
#	jetty-infinispan/pom.xml
#	jetty-io/pom.xml
#	jetty-jaas/pom.xml
#	jetty-jaspi/pom.xml
#	jetty-jmx/pom.xml
#	jetty-jndi/pom.xml
#	jetty-jspc-maven-plugin/pom.xml
#	jetty-maven-plugin/pom.xml
#	jetty-memcached/jetty-memcached-sessions/pom.xml
#	jetty-memcached/pom.xml
#	jetty-nosql/pom.xml
#	jetty-openid/pom.xml
#	jetty-osgi/jetty-osgi-alpn/pom.xml
#	jetty-osgi/jetty-osgi-boot-jsp/pom.xml
#	jetty-osgi/jetty-osgi-boot-warurl/pom.xml
#	jetty-osgi/jetty-osgi-boot/pom.xml
#	jetty-osgi/jetty-osgi-httpservice/pom.xml
#	jetty-osgi/pom.xml
#	jetty-osgi/test-jetty-osgi-context/pom.xml
#	jetty-osgi/test-jetty-osgi-fragment/pom.xml
#	jetty-osgi/test-jetty-osgi-server/pom.xml
#	jetty-osgi/test-jetty-osgi-webapp/pom.xml
#	jetty-osgi/test-jetty-osgi/pom.xml
#	jetty-plus/pom.xml
#	jetty-proxy/pom.xml
#	jetty-quickstart/pom.xml
#	jetty-rewrite/pom.xml
#	jetty-runner/pom.xml
#	jetty-security/pom.xml
#	jetty-server/pom.xml
#	jetty-server/src/test/java/org/eclipse/jetty/server/ErrorHandlerTest.java
#	jetty-servlet/pom.xml
#	jetty-servlets/pom.xml
#	jetty-spring/pom.xml
#	jetty-start/pom.xml
#	jetty-unixsocket/pom.xml
#	jetty-util-ajax/pom.xml
#	jetty-util/pom.xml
#	jetty-webapp/pom.xml
#	jetty-websocket/javax-websocket-client/pom.xml
#	jetty-websocket/javax-websocket-server/pom.xml
#	jetty-websocket/jetty-websocket-api/pom.xml
#	jetty-websocket/jetty-websocket-common/pom.xml
#	jetty-websocket/jetty-websocket-server/pom.xml
#	jetty-websocket/jetty-websocket-tests/pom.xml
#	jetty-websocket/pom.xml
#	jetty-websocket/websocket-core/pom.xml
#	jetty-websocket/websocket-servlet/pom.xml
#	jetty-xml/pom.xml
#	pom.xml
#	tests/jetty-jmh/pom.xml
#	tests/pom.xml
#	tests/test-continuation/pom.xml
#	tests/test-distribution/pom.xml
#	tests/test-http-client-transport/pom.xml
#	tests/test-integration/pom.xml
#	tests/test-jmx/jmx-webapp-it/pom.xml
#	tests/test-jmx/jmx-webapp/pom.xml
#	tests/test-jmx/pom.xml
#	tests/test-loginservice/pom.xml
#	tests/test-quickstart/pom.xml
#	tests/test-sessions/pom.xml
#	tests/test-sessions/test-file-sessions/pom.xml
#	tests/test-sessions/test-gcloud-sessions/pom.xml
#	tests/test-sessions/test-hazelcast-sessions/pom.xml
#	tests/test-sessions/test-infinispan-sessions/pom.xml
#	tests/test-sessions/test-jdbc-sessions/pom.xml
#	tests/test-sessions/test-memcached-sessions/pom.xml
#	tests/test-sessions/test-mongodb-sessions/pom.xml
#	tests/test-sessions/test-sessions-common/pom.xml
#	tests/test-webapps/pom.xml
#	tests/test-webapps/test-cdi-common-webapp/pom.xml
#	tests/test-webapps/test-felix-webapp/pom.xml
#	tests/test-webapps/test-http2-webapp/pom.xml
#	tests/test-webapps/test-jaas-webapp/pom.xml
#	tests/test-webapps/test-jetty-webapp/pom.xml
#	tests/test-webapps/test-jndi-webapp/pom.xml
#	tests/test-webapps/test-mock-resources/pom.xml
#	tests/test-webapps/test-owb-cdi-webapp/pom.xml
#	tests/test-webapps/test-proxy-webapp/pom.xml
#	tests/test-webapps/test-servlet-spec/pom.xml
#	tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml
#	tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml
#	tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml
#	tests/test-webapps/test-simple-webapp/pom.xml
#	tests/test-webapps/test-webapp-rfc2616/pom.xml
#	tests/test-webapps/test-weld-cdi-webapp/pom.xml
2019-11-26 10:46:22 -06:00
Joakim Erdfelt 5d7f7d6499 Merge branch 'release-9.4.24' into jetty-9.4.x 2019-11-26 10:31:28 -06:00
Lachlan Roberts 668cd86283 Issue #995 - UrlEncoded.encodeString should not encode unreserved chars
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-22 17:50:28 +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 87eefa344a
Fixes #3083 - Aligning default in ini to XML default
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-20 09:54:24 -06:00
Joakim Erdfelt e181a5878e
Fixing merge of SslContextFactory
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-18 16:21:04 -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
Joakim Erdfelt fcc3790237
Fixing merge of SslContextFactory and SniX509ExtendedKeyManager
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-18 13:03:37 -06:00
Joakim Erdfelt f7083f329e
Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-11-18 12:55:40 -06:00
Joakim Erdfelt f4d387e0d6
Issue #4325 - X509ExtendedKeyManager exceptions on non-Server SSL
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-18 12:13:05 -06:00
Joakim Erdfelt 55ad1074bd
Issue #4325 - X509ExtendedKeyManager exceptions on non-Server SSL
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-18 10:58:12 -06:00
Greg Wilkins 46a3368f3b
Issue #2578 - Listener behavior cleanup (Jetty 10.0.x) (#3966)
* Avoid creating listener list for rarely used requestAttributeListener

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

* Issue #3964

Keep a list of EventListeners in the AbstractConnector to make it
more efficient to add and iterate over them.

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

* Issue #2578 EventListener

Use addEventListener rather than bespoke listener methods.
Support getEventListenerBeans at Container level for fast lookup
improve javadoc

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

* Issue #2578 EventListener

fixed test
more javadoc

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

* Issue #2578 EventListener

fixed tests

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

* Issue #3964

Don't use null for empty lists of listeners

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

* fix merge

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

* Issue #2578 EventListener

Resolve differences between eventListeners added as beans and beans
added as EventListeners.   The behaviour should now be the same
regardless of how they listener is added and all listeners are now
beans.

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

* Issue #2578 EventListener

Add only SelectorManager listeners to manager from connector

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

* Issue #2578 EventListener

Fixed javadoc

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

* Issue #2578 EventListener

removed old TODO

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

* Issue #2578 EventListener

connector cannot be null

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

* Issue #2578 EventListener

javadoc

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

* Issue #3964

AbstractConnector keeps a specific list of HttpChannel.Listeners
to avoid Connection.Listeners and MBean listeners being added to
the HttpChannel listener list.

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

* Issue #2578 EventListener

fixed merge

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

* fixed javadoc

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

* Issue #2578 EventListener

removed the ability to set/clear context listeners
Instead just remove non-durable ones.

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

* Issue #3964 Listeners

Simplified listener handling by avoiding null connector, previously
only needed for testing.

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

* fixed bad merge

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

* Issue #3964 Listeners

Fixed test that assumed HttpChannel listeners were not cleared by a recycle

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

* Issue #3964 Listeners

Separated out durable vs cyclic HttpChannel.Listeners, so as to
simplify handling.

Deprecated cyclic HttpChannel.Listeners, as I'm not sure the channel is
the right place for them.

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

* removed deprecated cyclic HttpChannel listeners

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

* removed deprecated cyclic HttpChannel listeners - import

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

* Issue #4003 Cleanup quickstart

* Fixed tests that scan for "Started" on console

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

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-13 11:04:38 +11:00
Joakim Erdfelt 774160c7ec
Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebInfConfigurationTest.java
2019-11-12 14:53:38 -06:00
Joakim Erdfelt 3def3415ed
Merge pull request #4289 from eclipse/jetty-9.4.x-4287-move-getUriLastPathSegment
Issue #4287 - Move getUriLastPathSegment() to URIUtil
2019-11-12 14:51:23 -06:00
Simone Bordet b1d231b9e7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-11 16:45:12 +01:00
Greg Wilkins ee0f9fc1d0
Issue #4033 Percent Encoded Bad Requests (#4272)
* Modernizing testcase

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4033 Percent Encoded Bad Requests

Added test to demonstrate bad percent encoded request

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

* Issue #4033 - adding sanity test for percent paths and checkAlias()

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Eliminating 9.3.0.RC0 dependency

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4033 - More tests for Resource checkAlias() behavior

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4033 - Splitting badDecodePath

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4033 - More badDecodePath tests

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4033 Percent Encoded Bad Requests

reverted decodePathBehaviour

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

* testing pull request building

* Issue #4033

updates after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-11 12:01:26 +11:00
Joakim Erdfelt 4ab910bdc0
Issue #4287 - Move getUriLastPathSegment() to URIUtil
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-07 15:52:00 -06:00
Joakim Erdfelt cc58a74662
Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
#	jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebInfConfigurationTest.java
2019-11-07 15:37:30 -06:00
Joakim Erdfelt cc289980cf
Merge pull request #4268 from eclipse/jetty-9.4.x-4173-NPE-WebInfConfiguration
Issue #4173 Avoid NPE generating name of tmp dir in WebInfConfiguration
2019-11-07 14:49:20 -06:00
Joakim Erdfelt 64a916e6ec
Issue #4173 - use JarFileResource's Jar java.io.File object if present
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-07 05:11:48 -06:00
Joakim Erdfelt 13a574557b
JarFileResource.getFile() now returns the Jar's java.io.File object
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-06 16:09:54 -06:00
Jan Bartel f55fbdb7eb Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-11-06 16:09:02 +11:00
Jan Bartel aefbdfca58
Issue #2266 Rework Scanner and use it for Jetty Maven Plugin (#4239)
* Issue #2266 Rework Scanner and use it for Jetty Maven Plugin

Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-06 15:55:20 +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
Greg Wilkins dd53a8d70f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-05 09:17:29 +11:00
Simone Bordet e09444eeb5 Issue #3863 - Enforce use of SNI (#4085)
* Issue #3863 -  Enforce use of SNI.

Introduced SslContextFactory.rejectUnmatchedSNIHost (default false)
so that if no SNI is sent, or SNI does not match a certificate,
then the TLS handshake is aborted.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Issue #3863 - Enforce use of SNI.

Updates after review.
Introduced SslContextFactory.SNISelector to allow application to write
their custom logic to select a certificate based on SNI information.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Issue #3863 Enforce SNI

Added two sniRequired fields - one at SslContextLevel and the other at the SecureRequestCustomizer.  This allows rejection either at TLS handshake or by 400 response.

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

* Issue #3863 Enforce SNI

cleanups from review

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

* Issue #3863 Enforce SNI

improved comments

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

* Issue #3863 Enforce SNI

syntax sugar

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

* Issue #3863 SNI

Updates from review.  Extra test for sniSelector function

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-05 09:07:34 +11: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
Simone Bordet fd792bc637 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-20 17:03:21 +02:00
Simone Bordet dc59addb6f Code cleanup.
Made method reportDifferences(...) private since it was exposing
package private class TimeNSize and no code outside of jetty-util
could have used it.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-20 16:50:31 +02:00
Simone Bordet d2f714cd6a Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-20 16:20:10 +02:00
Simone Bordet 95b205aa34 Class InetPattern is package private, so made nnewInetRange(String)
private because no code outside jetty-util could call that method.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-20 16:18:58 +02:00
Simone Bordet 9a7e6d96de Merged remote-tracking branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-20 16:10:39 +02:00
Simone Bordet 92bfcb6c73 Class Managed is package private, so made addBean(Object, Managed)
private because no code outside of jetty-util could call that method.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-20 16:10:01 +02:00
Greg Wilkins 203eef4029 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-19 10:29:01 +11:00
Greg Wilkins 3d19f61122
Issue #4193 - Fix InetAccess port control (#4206)
* issue exclude/include con name InetAccesHandler - add better unit test

this logic:

        String name =
baseRequest.getHttpChannel().getConnector().getName();
        return _names.test(name) && _addrs.test(addr);

Is not correct. it's treating the connector name exactly like the
filter. But that's not what it's intended to do. It's supposed to tell
what connectors are applicable to this filter. And what connectors are
not affected.

For example in the unit test there exists 2 connectors:

http
tls

We want to restrict the http connector, but we want to leave tls
connector alone.

So we would specify:

include = 192.168.1.1-192.168.1.254
includeConnector = http

The way the logic is above, it is treating the connector name as if it's
the filter itself. Which is not what I intended.

What i need in psuedo-code is this:


   if (there are no "include connectors" OR if this connector is
included) AND (if this connector is not in the excluded list)
     ---> Then apply the IP filter.

Signed-off-by: Nicholas DiPiazza <nicholas.dipiazza@lucidworks.com>

* exclude should take precedence over include

Signed-off-by: Nicholas DiPiazza <nicholas.dipiazza@lucidworks.com>

* Issue #4193 InetAccessHandler

reverted changes to IncludeExcludeSet

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

* Issue #4193 InetAccessHandler

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-18 09:03:28 +11:00
Greg Wilkins f4d9223762 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 14:16:44 +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 8f1975cc04 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 14:00:22 +11:00
contextshuffling 320e848c57 Fixes #4195: making test assertion more stable (#4196)
Signed-off-by: contextshuffling <contextshuffling@gmail.com>
2019-10-15 07:54:09 +11:00
Simone Bordet 783f3b49b0 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-09 10:22:18 +02:00
Simone Bordet 0fc5ec9d18
Merge pull request #4171 from eclipse/jetty-9.4.x-4170-client_side_alias_selection
Fixes #4170 - Client-side alias selection based on SSLEngine.
2019-10-09 09:30:37 +02:00
Greg Wilkins 0bd71a4359
Pathwatcher Concurrent modification #4174 (#4175)
There is a race between the doStop clearing the key map and the watching thread
checking isRunning before iterating over the key map.

While more sophisticated approaches could be used, I think that is best to defer
until this class is reworked entirely.  For now just using a ConcurrentHashMap will
avoid the exception and the closing of the pathwatcher will prevent watching forever.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-09 13:58:16 +11:00
Simone Bordet 742f564332 Fixes #4170 - Client-side alias selection based on SSLEngine.
Fixed setting of host/port in AbstractConnectorHttpClientTransport
and HttpProxy so that the creation of SSLEngine can use the proper
host/port pair, and can be subsequently used in TLS components.

Introduced SslContextFactory X509ExtendedKeyManagerWrapper and
X509ExtendedTrustManagerWrapper as utility classes used internally
and in tests.

The test case for this issue required 3 keystores, so other test
classes have been refactored to use the new keystores.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-08 18:32:23 +02:00
Simone Bordet c93dddec30 Fixes #2429 - Review HttpClient backpressure semantic.
Fixes after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-08 12:18:14 +02:00