Commit Graph

2148 Commits

Author SHA1 Message Date
Lachlan Roberts b033d6078f Issue #5012 - Remove unneeded dependency for test-jaas-webapp
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-03 09:54:18 +02:00
Joakim Erdfelt 02bd1e5956
Followup changes from merge
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-25 12:52:49 -05: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
Simone Bordet 0b854a1f5f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-18 15:37:09 +02:00
olivier lamy f745d5d5df remove unused imports and upgrade testcontainers.version
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-06-15 17:40:15 +10:00
Joakim Erdfelt 6795f3915f
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-12 12:04:50 -05:00
Joakim Erdfelt 4abd8b1b39
Merge remote-tracking branch 'origin/release-9.4.30' into jetty-9.4.x 2020-06-12 11:31:42 -05:00
Jan Bartel 004bbe4e9f Add deletion test for memcached session data cache.
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-06-12 18:20:14 +10:00
olivier lamy 7f0c725fd4 upgrade testcontainers to 1.14.2
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-06-12 18:20:14 +10:00
olivier lamy a78d2f475d use testcontainers to start memcached via docker for testing real remote memcached server
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-06-12 18:20:14 +10: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
Jan Bartel cb09abe873
Issue #4920 Restore ability to invalidate sessions on shutdown (#4933)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-06-10 18:40:19 +02:00
olivier lamy 593d3e9aa6 remove duplicate dependency
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-06-07 09:31:44 +10:00
Joakim Erdfelt 426795660f
Cleaning up double-merge final issues.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-03 16:14:32 -05:00
Joakim Erdfelt 0cce039e7c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-03 16:10:41 -05:00
Jan Bartel 5d328ba928 Suppress debug stacktrace for TestFileSessions.testSweep
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-06-03 10:26:13 +02: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
olivier lamy 2b1fa80b63 always run the test except if Docker not available
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +10:00
olivier lamy 7cc3573ceb remove derby system property
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +10:00
olivier lamy 389f46c826 bye bye Derby tests, only use mariadb via container
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +10:00
olivier lamy 1249763aad remove changes to DatabaseAdaptor with new fields username/password, use our own username/password in maria_db tests
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +10:00
olivier lamy c05bd6c26d use testcontainers/docker to run jdbc sessions tests with Mariadb remote
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +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
Jan Bartel 42e46aee49 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-20 23:06:27 +02:00
Jan Bartel 52e7dd4873
Issue #4895 SessionCache flushOnResponseCommit with invalid session (#4896)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-05-20 23:05:53 +02:00
olivier lamy 9c7d36fd51 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-05-16 20:03:09 +10:00
olivier lamy 9b16f2deee do not create on start
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy bb26241a37 add RemoteQueryManagerTest to use infinispan via testcontainer, simplify how we start infinispan
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy ebbe2c5843 use new junit api to test exception
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy 90527065c0 no need to ignore those tests
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy 6b0b5c13e5 finally use the file from Jan :)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy e2edd6f38f more testing with Jan configuration file
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy abec84596f Activate infinispan remote testing using docker image
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10:00
olivier lamy a0b9cb3fa4 use docker image to test infinispan remote access
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-16 19:38:33 +10: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 972cd95ec0 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-05-08 10:21:41 +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
Lachlan 2e1c01ac8c
Merge pull request #4723 from eclipse/jetty-10.0.x-WebSocketServlet
Issue #4722 - remove websocket-servlet
2020-05-07 22:45:04 +10: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
Lachlan Roberts e5cca92199 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-WebSocketServlet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-01 15:46:03 +10:00
Lachlan Roberts 1ad600ea49 fix WS DistributionTest incorrect test expectation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-04-30 10:14:43 +10:00
Lachlan Roberts b0e57ffd6d Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-LinkageErrorInvestigation 2020-04-29 22:52:33 +10:00
Lachlan Roberts bf5d4ea554 Issue #4800 - Revert MethodHandle changes & update DistributionTests
- It seems it is correct to use the `MethodHandles.publicLookup().in()`
but this does not work if same webapp is deployed twice, so the
MethodHandle changes have been reverted and the test has been disabled
until a resolution to https://bugs.openjdk.java.net/browse/JDK-8244090.

- The DistributionTest has been changed to properly reproduce the issue.
There must be a class in the signature of the websocket endpoint which
is available to both webapps and the client must send and receive an echo
message to ensure that the onOpen MethodHandle is actually invoked.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-04-29 22:52:26 +10:00
olivier lamy 4a4626614c ooops checkstyle
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-04-29 15:22:35 +10:00
olivier lamy c5f8cf2f6a add a parameter to add jvm args
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-04-29 14:11:41 +10:00
Greg Wilkins 8c7e34f37d
Jetty 10.0.x immutable meta data (#4777)
Made HttpURI, HttpFields and MetaData immutable.  The first two follow the same builder pattern and MetaData is constructor injection only.

* Immutable version of HttpFields

Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.

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

* Immutable version of HttpFields

Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable

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

* Immutable version of HttpFields

Fixed exception type.

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

* Immutable version of HttpFields

asImmutable method

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

* Immutable MetaData

Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.

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

* Immutable MetaData

Fixes from review

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

* Immutable MetaData

Passing tests upto and including jetty-server

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

* Immutable MetaData

Cleanup of HttpURI.Builder API as suggested in PR.

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

* Immutable MetaData

Added builder for MetaData.Request

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

* Immutable MetaData

more api fixes

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

* Immutable MetaData

WIP making HttpFiels itself immutable.  Currently working up to jetty-servlet.

Need to consider if content-length really is meta data and how much and when can we trust it.

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

* Immutable MetaData

WIP

Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.

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

* Immutable MetaData WIP

jetty-client and jetty-servlet passing tests.

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

* Immutable MetaData WIP

Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`

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

* Immutable MetaData WIP

http2-server tests passed

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

* Immutable MetaData WIP

http2-client tests passed

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

* Immutable MetaData WIP

cleann build?

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

* Immutable MetaData WIP

fix

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

* Immutable MetaData WIP

more test fixes

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

* Immutable MetaData WIP

Cleanups, mostly using EMPTY when appropriate.

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

* Immutable MetaData WIP

Cleanups, use immutable

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

* Immutable MetaData WIP

No trailers for connect

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

* Immutable MetaData WIP

Fix CONNECT path handling

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

* Immutable MetaData WIP

fixed rewrite query handling

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

* Immutable MetaData WIP

rename Builders to Muttables

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

* Immutable MetaData WIP

misc cleanups

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

* Immutable MetaData WIP

Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!

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

* Immutable MetaData WIP

More optimizations and better test coverage.

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

* Immutable Metadata

various cleanups

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

* Immutable MetaData WIP

More optimizations

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

* Immutable MetaData WIP

review changes

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + more usage of EMPTY
 + restored fragment handling

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + less usage of asImmutable

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable

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

* Immutable MetaData

changes after review:
 + better handling of URI in ContextHandler

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

* Immutable MetaData

changes after review:
 + downcast in test to access mutable response headers.

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

* Immutable MetaData

changes after review:
 + use put instead of add for one time headers

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

* private

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:36:44 +02:00