Commit Graph

4836 Commits

Author SHA1 Message Date
Greg Wilkins ee5cd7b3ea Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-01-10 07:21:41 +11:00
Greg Wilkins 96f6f2bb8d
Fix #4461 HttpOutput Aggregation (#4466)
* Issue #4461 HttpOutput Aggregation

Added tests to check that aggregation continues after first flush of an aggregated buffer (this triggers both #4461 and the discovered bug of not aggregating because of empty at capacity aggregate buffer).

Added getAggregateSize method that does a compact to avoid empty at capacity aggregate buffer

Call onWriteComplete if residue of an overflow aggregation can itself be aggregated.

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

* Issue #4461 HttpOutput Aggregation

Removed implicit compact from GzipHandler

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

* Issue #4461 HttpOutput Aggregation

Improve test coverage

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

* Issue #4461 HttpOutput Aggregation

Remove case that can never happen.

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

* Issue #4461 HttpOutput Aggregation

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-10 07:20:54 +11: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 a2ebb1dc8a
Merge pull request #4469 from eclipse/jetty-10.0.x-4459-move_multipart_to_server
Fixes #4459 - Move multipart classes to jetty-server.
2020-01-09 17:39:12 +01:00
Simone Bordet a1f155b44a Fixes #4460 - Provide a parameterless CustomRequestLog.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-09 16:39:03 +01:00
Simone Bordet 4e2c3f1447 Fixes #4459 - Move multipart classes to jetty-server.
Moved multipart classes to jetty-server.
Updated jetty-http's pom.xml and module-info.java
removing the dependency on Servlet APIs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-09 16:23:05 +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
Simone Bordet 8d2465c8ad Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-07 15:46:41 +01:00
Simone Bordet aed5a4458c Added forgotten @Deprecated annotation to deprecated method.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-07 15:40:46 +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
Lachlan Roberts c98897315c Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4225-jpms_transitivity 2019-12-27 19:27:59 +11: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
Joakim Erdfelt 3290b85e8f
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-12-20 10:29:21 -06:00
Joakim Erdfelt ccf04a47cd
Merge pull request #4375 from eclipse/jetty-9.4.x_small_improvment_jdbc
avoid non necessary objects allocation if session do not have any attributes data
2019-12-20 10:29:01 -06:00
Simone Bordet 99eae6b3ce Issue #4225 - Fix JPMS transitivity.
Removed methods that were overridden to
workaround eclipse-ee4j/servlet-api#228
in servlet-api 4.0.2, but that are now
fixed in servlet-api 4.0.3.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 19:57:23 +01: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
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
Lachlan Roberts aedcaac2e0 Fix flaky multipart tests in RequestTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-12-18 12:28:01 +11:00
Simone Bordet b1e2f80017 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-17 13:41:15 +01:00
Simone Bordet 129a51c7a2
Fixes #4421 - HttpClient support for PROXY protocol. (#4424)
* Fixes #4421 - HttpClient support for PROXY protocol.

Implemented support for the PROXY protocol in HttpClient.

Introduced Request.tag(Object) to tag requests that belong
to the same group (e.g. a client address) so that they can
generate a different destination.

The tag object may implement ClientConnectionFactory.Decorator
so that it can decorate the HttpDestination ClientConnectionFactory
and therefore work both with and without forward proxy configuration.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-17 10:36:16 +01:00
Lachlan 584e264b0b
Clean up CustomRequestLog and fix the handling of the %u code. (#4397)
* Clean up CustomRequestLog and fix the handling of the %u code.
* Add test for logging of remote user with %u and %{d}u
* update javadoc to clarify that %u is only for servlet auth
* remove the prepended '?' when deferred authentication is checked
2019-12-17 11:28:39 +11:00
Simone Bordet 8245038a90 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-11 13:50:05 +01:00
Simone Bordet 6bbec7f3b0 Issue #4411 - Jetty server spins on incomplete request.
Fixed HttpInput to be in READY state if an error is detected
before the call to setWriteListener().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-11 00:11:29 +01:00
Simone Bordet 2364b075d7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-07 12:42:00 +01:00
Joakim Erdfelt 2ee079feb1
Merge 'jetty-9.4.x' of github.com:eclipse/jetty.project into jetty-9.4.x 2019-12-06 13:24:43 -06:00
Joakim Erdfelt 53eda03203
Making exception message more clear
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-06 13:24:30 -06:00
Simone Bordet 3417e1defe Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-04 15:33:58 +01:00
Greg Wilkins c6633e8d67 fixed bad merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-04 15:32:28 +11:00
Simone Bordet 839846d9a6 Fixes #4392 - Suppress logging of QuietException in HttpChannelState.asyncError().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-03 13:01:28 +01:00
Greg Wilkins 5545e906f0 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-03 12:52:29 +11:00
Greg Wilkins 85cda88b40
Issue #4376 Async Content Complete (#4377)
* 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 #4376 Async Content Complete

ERROR state still needs to be closed!

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

* Issue #4376 Async Content Complete

close after last blocking write

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

* Issue #4376 Async Content Complete

If completion has to do a flush, then we need a call to closed to
avoid leaking buffers.

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

* Issue #4376 Async Content Complete

Reformat

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-03 08:50:36 +11:00
Joakim Erdfelt c0f8a46c35
Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunDistro.java
2019-12-02 15:29:30 -06:00
Joakim Erdfelt d99ae19201
Merge pull request #4290 from eclipse/jetty-9.4.x-4269-restore-PrintWriter-contract
Issue #4269 - Restoring PrintWriter contract on errors
2019-12-02 15:22:22 -06:00
Simone Bordet 3b817821e7
Merge pull request #3740 from eclipse/jetty-10.0.x-3537-bootstrap_websocket_http2
Issue #3537 - Bootstrap websocket on HTTP/2
2019-11-28 15:47:26 +01:00
olivier lamy e58f570266 remove unused import
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-11-28 13:42:52 +10:00
olivier lamy 9576763c67 avoid non necessary objects allocation if session do not have any attributes data
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-11-28 11:15:48 +10:00
Lachlan Roberts 76bb8d2327 Issue #4368 directly use MultiPartFormInputStream instead of MultiParts
MultiPart cleanup is now done in Request.onCompleted()

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-27 17:20:01 +11:00
Lachlan Roberts 6988c4feaa Issue #4368 - make MultiParts a class instead of interface
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-27 15:35:21 +11:00
Jan Bartel 149ac97b6f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-11-27 11:58:12 +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
Simone Bordet f14ab3fc39 Merge branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-22 09:43:01 +01:00
Joakim Erdfelt 0f7a3b2d91 Updating to version 9.4.25-SNAPSHOT 2019-11-20 16:08:38 -06:00
Joakim Erdfelt 217602e97f
Issue #4334 - Enhancing JSON Test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-20 15:48:22 -06:00
Joakim Erdfelt 363d5f2df3 Updating to version 9.4.24.v20191120 2019-11-20 15:25:01 -06:00
Joakim Erdfelt cf0df6e3ff
Issue #4334 - Improve testing of ErrorHandler behavior
+ Cleanup from PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-20 13:17:17 -06:00
Joakim Erdfelt 9e40fc9a6f
Issue #4334 - Improve testing of ErrorHandler behavior
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-20 09:47:33 -06:00
Joakim Erdfelt dc03431de2 Merge branch 'release-9.4.23' into jetty-9.4.x 2019-11-20 07:14:53 -06:00
Simone Bordet 04dc257641 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-19 10:50:31 +01:00
Joakim Erdfelt 61cbb7529d
Removing duplicate log output
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-18 16:44:48 -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
Jan Bartel d1171b17d9 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-11-18 09:29:11 +11:00
Jan Bartel 318246eb24
Issue #4156 Remove use of PlaceHolderSession for simultaneous session loading (#4304)
* Issue #4156 Remove use of PlaceHolderSession for simultaneous session loading.
2019-11-18 09:06:38 +11:00
Simone Bordet 5e695919d9 Implemented support for RFC 8441's SETTING_ENABLE_CONNECT_PROTOCOL.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-14 23:48:34 +01:00
Simone Bordet 06ce13e226 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'. 2019-11-14 12:42:15 +01:00
Greg Wilkins 8fef35c573 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-14 13:30:23 +11:00
Greg Wilkins 32931fac7b
Issue #4247 SameSite Session Cookie (#4271)
* Issue #4247 SameSite Session Cookie

Allows sameSite cookie settings to be configured in SessionCookieConfig comments

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

* Issue #4247 SameSite Session Cookies

Use non versioned cookie

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

* Issue #4247 SameSite Session Cookies

Added test and fixed getCommentWithAttributes

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

* Issue #4247 - Updating unit tests for HttpCookie

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

* Issue #4247 SameSite Session Cookie

While it may be best practise to always use Secure cookies when SameSite is None, there is nothing in the RFC that mandates it and thus I don't believe we should prevent such a configuration.  If browsers enforce this, then users will find out soon enough... and if browsers change, then we are not required to do a new release to match.

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

* Issue #4247 SameSite Session Cookie

For cookie comments with multiple SameSite attributes, the most strict
value is used. So `Strict` has precedence over `Lax` which has
precedence over `None`.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-14 11:56:40 +11:00
Greg Wilkins b24c6ce68d
Issue #2340 ServletContext cleanup (#4307)
* Issue #2340 ServletContext cleanup

A minor cleanup of the ServletContext implementation classes.

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

* Issue #2340 ServletContext cleanup

cleanup after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-14 11:52:03 +11:00
Joakim Erdfelt a44a46f3f1
Adding stalebot integration
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-13 15:43:48 -06:00
Joakim Erdfelt 6b96e3db21
Adding stalebot integration
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-13 15:42:07 -06:00
Joakim Erdfelt ff7adab55a
Issue #4269 - Correcting PrintWriter test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-13 14:47:53 -06:00
Greg Wilkins c64bd7d2f0 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-13 16:11:16 +11: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
Greg Wilkins 24df8c59a3
Issue #4279 Writer close deadlock (#4288)
Do not close the actual writer from closed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-13 11:03:17 +11:00
Greg Wilkins fe4b9cf366
Issue #4161 Write LifeCycleViolation (#4294)
* Issue #4161 - TestCase that can replicate problem on OSX

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

* Issue #4161 - Naming Server threadpool (to help with debugging)

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

* Issue #4161 - bumping up test file size to 10 MB

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

* Issue #4161 Write LifeCycleViolation

Do not callback on write completion until after state has been changed and notifications made.

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

* Issue #4161 Write LifeCycleViolation

Added a unit test that replicated the problem.

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

* Issue #4161 - `EofException: request lifecycle violation` in stderr.

Moved notifications of commit and content listeners back to succeeded().

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

* Issue #4161 - Improved Logging for test-integration

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

* Issue #4161 - Reducing size of test file

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-13 11:02:12 +11:00
Simone Bordet 5f9edb1361 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-12 16:41:33 +01: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
Lachlan c336616c96
Issue #2709 - reduce default headerCacheSize to 1024 (#4292)
make headerCacheSize on HttpReceiverOverHTTP configurable

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-08 21:57:49 +11:00
Joakim Erdfelt c0866ebeae
Issue #4269 - Restoring PrintWriter contract on errors
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-07 15:59:13 -06:00
Joakim Erdfelt e103a5e1a7
Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorHandler.java
#	tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml
2019-11-07 13:25:04 -06:00
Greg Wilkins 070d2b235e Issue #4264 Revert doError signature
revert the doError signature.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-07 09:31:52 +11: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
Lachlan 0338dc037c
Issue #4228 - remove default keystore passwords not from test-keystore.mod (#4229)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-06 11:12:56 +11:00
Olivier Lamy 37aa5a17e0
Issue #4243 invalid json error response from ErrorHandler (#4249)
* Issue #4243  invalid json error response from ErrorHandler

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-11-06 09:09:44 +10: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
Greg Wilkins 869c3b51ce
Issue #4265 Remove doError (#4266)
* Issue #4265 Remove doError

The doError method and the ErrorDispatchHandler class were
hang overs from when we needed to dispatch into a context to get sendError called, which would then generate the error page.

Now sendError doesn't do any generation, rather it changes state that arranges either for a minimal error page to be generated or an ERROR dispatch to a real handler/servlet to generate the error page.

Thus the ErrorDispatchHandler and doError methods can now be removed.

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

* Issue #4265 Remove doError

Moved the error page dispatching logic back to the ErrorHandler class to assist with backwards compatibility

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

* Issue #4265 Remove doError

Moved the error page dispatching logic back to the ErrorHandler class to assist with backwards compatibility

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

* Issue #4265 doError

Updates from review.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-05 08:45:46 +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
olivier lamy 85cb8e8c5d Issue #4222 fix major/minor version
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-10-20 09:33:22 +10: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
Joakim Erdfelt 890c0b26cb Fixes #4203 and #4204 - Transfer-Encoding + Content-Length behaviors (#4205)
* Issue #4203 - Updating test to verify report on Transfer-Encoding

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

* Fixes #4203 - Transfer-Encoding + Content-Length is 400 Bad Request

+ Fixing validation to not be header order dependent.

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

* Issue #4203 - Fixing hasTransferEncoding reset and testcase assumption

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

* Issue #4204 - Transfer-Encoding RFC7230 behaviors

+ More test cases and implementation.

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

* Issue #4204 - Transfer-Encoding RFC7230 behaviors

+ Adjusting HttpParser to handle the case where we have multiple
  Transfer-Encoding headers and none declare the 'chunked' token.

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

* Issue #4204 - Transfer-Encoding RFC7230 behaviors

+ Making changes from PR review

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

* Issue #4203 Transfer Encoding

request with TE and no chunking is a Bad Request

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-19 08:05:15 +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 894fc9b115
Issue #4208 - Content-Length in 304 (#4211)
* Issue #4208 Content-Length in 304

Added tests for RFC7230 section 3.3.2 for 304 and HEAD responses with content length.
Fixed HttpGenerator to set content-length in 304 response
Fixed insufficient content written check for 304

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

* Issue #4208 Content-Length in 304

Use contentLengthField

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-17 14:26:19 +11:00
Simone Bordet 329b819d72 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-16 23:36:47 +02:00
Simone Bordet 869184c827
Merge pull request #4200 from eclipse/jetty-9.4.x-4190-deadlock_httpoutput_close
Fixes #4190 Jetty hangs after thread blocked in SharedBlockingCallbac…
2019-10-16 23:35:52 +02:00
Joakim Erdfelt 8c928e0fd1
Merge branch 'jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java
2019-10-16 15:31:09 -05:00