Commit Graph

2188 Commits

Author SHA1 Message Date
olivier lamy c291df5463 we do not want dependencies definied as range even for test transitive dependencies
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-11-27 07:04:57 +10: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 dc03431de2 Merge branch 'release-9.4.23' into jetty-9.4.x 2019-11-20 07:14:53 -06:00
Simone Bordet e89e8ae16e Improved toString() for ConnectionPool implementations.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-19 10:43:09 +01: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
Simone Bordet bf2482a7ea Moved implementation from Adapter classes to default methods in
the interface to avoid binary compatibility problems in case the
interface is changed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-18 10:29:55 +01:00
Simone Bordet aa57463175 Fixes #4301 - Demand beforeContent is not forwarded.
Now correctly handling no demand before the content
in FCGI and HTTP2 transports.

Fixed HttpRequest to correctly forward onBeforeContent()
to wrapped listeners.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-12 23:33:21 +01:00
Simone Bordet 4825832a53
Merge pull request #4286 from eclipse/jetty-9.4.x-4277-httpclient_async_gzip
Fixes #4277 - Reading streamed gzipped body never terminates.
2019-11-12 19:04:05 +03: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
Simone Bordet a83c297a11 Fixes #4277 - Reading streamed gzipped body never terminates.
Fixed handling of demand in case of gzipped response content.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-07 22:32:11 +01: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 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 e137ee3cd7
Issue #4217 - SslConnection DecryptedEndpoint flush eternal busy loop
+ Cleanup from review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-30 14:03:16 -05:00
Joakim Erdfelt c58fd58e41
Testing Large TLS Records for Jetty 9.2.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-29 19:14:07 -05:00
Joakim Erdfelt e665c8f806
Issue #4217 - SslConnection DecryptedEndpoint flush eternal busy loop
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-24 16:26:43 -05: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 73eb82c20f Issue #4217 - SslConnection.DecryptedEndpoint.flush eternal busy loop.
Updates after review.
Added test case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-19 20:06:10 +02:00
Simone Bordet 991cf20cce Issue #4217 - SslConnection.DecryptedEndpoint.flush eternal busy loop.
Releasing the decrypted input buffer so that it can be re-acquired
with an expanded capacity.
Looping around only if the buffer size has changed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-19 12:27:58 +02:00
Simone Bordet 2e633a4e86 Fixes #4217 - SslConnection.DecryptedEnpoint.flush eternal busy loop.
Releasing the encrypted output buffer so that it can be re-acquired
with an expanded capacity.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-17 19:41:52 +02:00
Simone Bordet 20e0453da8 Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-4201-httpclient_throw_sslhandshakeexception'. 2019-10-16 18:51:15 +02:00
Simone Bordet 1e360244a5 Fixes #4209 - Unused TLS connection is not closed in Java 11.
Added workarounds for the Java 11 behavior.

In fill(), call closeInbound() if we filled -1 and the handshake
did not start yet. This avoids to send a ClientHello to the peer
even if we are closing.

In flush(), if the handshake status is NEED_UNWRAP but we are
closing, force a wrap().

Added test cases.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-16 13:10:40 +02:00
Simone Bordet 4769de8a2b Issue #4209 - Unused TLS connection is not closed in Java 11.
Code cleanup.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-16 13:02:24 +02:00
Simone Bordet 3ce87f717c Fixes #4201 - Throw SSLHandshakeException in case of TLS handshake failures.
Now rethrowing other exceptions as SSLHandshakeException
if they happen during the TLS handshake.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-15 16:44:30 +02:00
Simone Bordet cf687457e7 Issue #4177 - Configure HTTP proxy with SslContextFactory.
Small fixes after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-10 10:41:42 +02:00
Simone Bordet a73568df28 Fixes #4177 - Configure HTTP proxy with SslContextFactory.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-10 10:00:17 +02:00
Simone Bordet c8175ec107 Fixes #4177 - Configure HTTP proxy with SslContextFactory.
It is now possible to pass a `SslContextFactory.Client` to HttpProxy
so that it is possible to use a keystore for the proxy communication
and another keystore for the server communication.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-09 17:37:00 +02: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 a4603c4237 Issue #2429 - Review HttpClient backpressure semantic.
Updated after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-08 00:52:11 +02:00
Simone Bordet ef05f730e6 Issue #4115 - Drop HTTP/2 pseudo headers.
Added Javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-03 16:58:16 +02:00
Simone Bordet 3be178c966 Merged 'jetty-9.4.x' into 'jetty-9.4.x-2429-httpclient_backpressure'. 2019-10-03 13:17:39 +02:00
Joakim Erdfelt 6fc42d8ba2 Merge branch 'release-9.4.21' into jetty-9.4.x 2019-10-01 13:35:43 -05:00
Simone Bordet 72d1a297a0
Merge pull request #4109 from mofleury/jetty-9.4.x
Support meaningful JMX ObjectNames for HttpDestinations by avoiding race condition at creation
2019-10-01 17:31:45 +02:00
Marc-Olivier Fleury 8e51a4d532 adjusted formatting to follow standards
Signed-off-by: Marc-Olivier Fleury <mofleury@gmail.com>
2019-09-30 08:34:54 +02:00
Simone Bordet 2c75e876a3 Fixes #3787 - Jetty client throws EOFException instead of SSLHandshakeException on certificate errors.
Now exceptions thrown by fill() or flush() are stored in a field.
Further fill() operations will rethrow the original exception rather
than returning -1.

Returning -1 to application was causing them to close() with a generic
failure that was triggering the EOFException reported in this issue.

Now applications see the original exception and can close() with the
proper cause.

Re-enabled HostnameVerificationTest that was reproducing this issue
reliably but was @Disabled a while back and never re-enabled.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-26 18:30:43 +02:00
Simone Bordet d12df30df7 Issue #3787 - Jetty client throws EOFException instead of SSLHandshakeException on certificate errors.
Code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-26 18:18:13 +02:00
Joakim Erdfelt 7807eafad9 Updating to version 9.4.22-SNAPSHOT 2019-09-26 10:46:28 -05:00
Joakim Erdfelt 72970db61a Updating to version 9.4.21.v20190926 2019-09-26 09:59:15 -05:00
Simone Bordet b3be28086b Fixes #4113 - HttpClient fails with JDK 13 and TLS 1.3.
1. Now forwarding the fillable event rather than assuming that is due
to garbage bytes or by a server close. This ensures that a HTTP read
consumes the TLS bytes and the `NewSessionTicket` message.
2. Avoid to set the `SslConnection` onto the `EndPoint` in
`SslClientConnectionFactory` - this allows upgrades to work properly,
for example when tunnelling through a secure proxy.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-23 17:59:37 +02:00
Marc-Olivier Fleury ebe28c27e4 using computeIfAbsent to avoid the duplicate registering of Destinations in the MBean Server
Signed-off-by: Marc-Olivier Fleury <mofleury@gmail.com>
2019-09-20 14:55:45 +02:00
Simone Bordet d39f19cc23 Issue #2429 - Review HttpClient backpressure semantic.
Introduced a Response.DemandedContentListener to explicitly separate
the will to request more content from the notification that the content
has been consumed.

Updated all transports to follow the new semantic: rather than waiting
for the callback to complete before delivering more content, now they
wait for the demand to be positive to deliver more content.

Since now the content may be unconsumed but there can be more demand,
all transport implementation had to be changed to use RetainableByteBuffer
to retain content buffers that were not consumed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-19 17:19:25 +02:00
Simone Bordet 8c1e0b0714 Fixes #4082 - Debug logging causes NullPointerException in client.
Using BufferUtil to guard against NPEs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-12 12:14:15 +02:00
康智冬 3a6b26d292 fix typo (#4055)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-05 13:17:30 -04:00
康智冬 49ba6d1acb fix typo and grammar (#4045)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-02 14:29:50 -04:00
Olivier Lamy fe3d3f7158
fix checkstyle in test sources (#4013)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 19:56:41 +10:00
Joakim Erdfelt f1efc99918 Updating to version 9.4.21-SNAPSHOT 2019-08-13 17:34:20 -05:00
Joakim Erdfelt 84700530e6 Updating to version 9.4.20.v20190813 2019-08-13 16:13:21 -05:00
Simone Bordet 8431686939 Issue #3883 - Client: support embedding threadlocal data (e.g. distributed tracing data) into the request.
Added test case that shows how to do it.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-26 14:51:53 +02:00
Greg Wilkins 9706d70484
Jetty 9.4.x reformat (#3811)
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Applying XML restyling
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Reformatting pom.xml files
* Fixed empty string from line wraps
* Update intellij style to not do expression relative formatting. Reformatted code based on that.
* Increasing line split on Eclipse IDE Formatter to 512
* Restoring setting on internal default value.
+ IntelliJ will not export settings on things that set to their
  internal default values.
  We want to keep those values as a hedge against future default
  value changes in future releases of IntelliJ.
* Fixing intellij codestyle
* do not allow single line simple methods
* misc checkstyle fixes
* re-exported with correct name and all values

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-24 17:40:30 +02:00
Simone Bordet 0b56089327
Merge pull request #3772 from eclipse/jetty-9.4.x-3758-http2_dont_send_empty_trailers
Issue #3758 - Avoid sending empty trailer frames for http/2 requests.
2019-06-13 09:35:22 +02:00
Simone Bordet 82f7647629 Issue #3758 - Avoid sending empty trailer frames for http/2 requests.
Added one more test case and comments about handling of
`content.isConsumed()` in HTTP/2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-06-12 19:15:15 +02:00
Simone Bordet 8f53d14e15 Issue #3758 - Avoid sending empty trailer frames for http/2 requests.
Modified the sender logic to allow specific subclasses to decide
when to send the trailers, if any.
This allows HTTP/2 to correctly compute the end_stream flag and avoid
sending empty trailers frames with end_stream=true.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-06-12 10:51:15 +02:00
Joakim Erdfelt ae21126cad Updating to version 9.4.20-SNAPSHOT 2019-06-10 13:40:17 -05:00
Joakim Erdfelt afcf563148 Updating to version 9.4.19.v20190610 2019-06-10 11:17:56 -05:00
Olivier Lamy f2c59a3cb7
add convenient StringUtil isEmpty method (#3687)
* add StringUtil.isEmpty

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-05-23 09:01:36 +10:00
Joakim Erdfelt b44ecc932a Issue #2909 - Replace B64Code with java.util.Base64
+ Deprecated B64Code
+ All code that isn't B64CodeTest is now using java.util.Base64
+ B64CodeTest is updated to confirm change to java.util.Base64
  is possible without change in behavior. Just have to make
  sure you use the appropriate Encoder / Decoder for the task
  at hand (default vs mime vs url)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-05-15 10:08:11 +02:00
Joakim Erdfelt 5e7426674d Moving to IPv6 Assumption (from junit Group/Tag)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-04-30 14:36:17 -05:00
Joakim Erdfelt e33dfabba9 Moving to IPv6 Assumption (from junit Group/Tag)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-04-30 12:26:14 -05:00
Joakim Erdfelt 734be56938 Updating to version 9.4.19-SNAPSHOT 2019-04-29 16:27:23 -05:00
Joakim Erdfelt e1bc35120a Updating to version 9.4.18.v20190429 2019-04-29 15:40:33 -05:00
Joakim Erdfelt 05bb111580 Updating to version 9.4.18-SNAPSHOT 2019-04-18 15:59:49 -05:00
Joakim Erdfelt aa1c656c31 Updating to version 9.4.17.v20190418 2019-04-18 14:44:28 -05:00
Joakim Erdfelt 5882d63ba7 Updating to version 9.3.28-SNAPSHOT 2019-04-18 13:54:17 -05:00
Joakim Erdfelt d3e249f869 Updating to version 9.3.27.v20190418 2019-04-18 13:10:03 -05:00
Joakim Erdfelt 2c14d93885 Updating to version 9.2.29-SNAPSHOT 2019-04-18 12:17:07 -05:00
Joakim Erdfelt 1dffa36fe3 Updating to version 9.2.28.v20190418 2019-04-18 11:23:17 -05:00
Joakim Erdfelt c75136fe63 Merge branch 'release-9.4.16' into jetty-9.4.x 2019-04-18 10:13:20 -05:00
Joakim Erdfelt 3ab1ea3181 Merge branch `jetty-9.2.x` into `jetty-9.3.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
#	jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientURITest.java
#	jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java
#	jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/HttpClientTest.java
#	jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerTest.java
#	jetty-server/src/main/java/org/eclipse/jetty/server/handler/DefaultHandler.java
#	jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java
#	jetty-spdy/spdy-http-client-transport/src/test/java/org/eclipse/jetty/spdy/client/http/HttpClientTest.java
#	jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java
#	pom.xml
2019-04-17 16:47:15 -05:00
Joakim Erdfelt 72b4f92280 Updating to tests to protect if IPv6 is unavailable.
+ Updating to jetty-test-helper 4.2.1 with new Net.class
+ Assume.assumeTrue(Net.isIpv6InterfaceAvailable());

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-04-16 18:10:55 -05:00
Joakim Erdfelt ec34fafc3f Updating to tests to protect if IPv6 is unavailable.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-04-16 17:27:26 -05:00
Joakim Erdfelt 879e161c22 Updating to tests to protect if IPv6 is unavailable.
+ Updating to jetty-test-helper 3.1.1 with new Net.class
+ Assume.assumeTrue(Net.isIpv6InterfaceAvailable());

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-04-16 16:34:12 -05:00
Simone Bordet d6b6aa4285 Increased connection timeouts.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-04-16 16:38:17 +02:00
Simone Bordet 267991982e Increased timeouts for tests that connect to external sites.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-04-16 11:43:49 +02:00
Simone Bordet 64549fb19c Updated Conscrypt to 2.1.0.
Tagged tests that connect to external servers as "external".

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-04-15 18:10:21 +02:00
Joakim Erdfelt 79537a5f51 Updating to version 9.4.17-SNAPSHOT 2019-04-11 11:00:24 -05:00
Joakim Erdfelt e0aa4ae4c0 Updating to version 9.4.16.v20190411 2019-04-11 10:01:26 -05:00
Simone Bordet 36700bec50
Merge pull request #3442 from eclipse/jetty-9.4.x-3411-httpclient_timeout_infinite_redirect
Fixes #3411 - HttpClient does not timeout during multiple redirection.
2019-04-07 10:48:45 +02:00
olivier lamy 4ad8553fb1 fix format removing extra space
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-04-07 10:06:06 +10:00
Simone Bordet aa7e9ee060
Merge pull request #3474 from eclipse/jetty-9.4.x-3180-review_unixsocket
Issue #3180 - Review client support for Unix sockets.
2019-04-06 11:55:29 +02:00
Olivier Lamy 8829602201
Exclude ipv6 tests for ci profile (Jenkins) (#3528)
* exclude ipv6 test as currently failing on kubernetes, using junit tag and ci profile activated via Jenkinsfile

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* upgrade surefire to 3.0.0-M3

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-04-06 13:27:42 +10:00
Joakim Erdfelt 9b19374c5d Updating to version 9.2.28-SNAPSHOT 2019-04-03 19:38:05 -05:00
Joakim Erdfelt 84dfe74b97 Updating to version 9.2.27.v20190403 2019-04-03 19:04:45 -05:00
Joakim Erdfelt c70034766e Updating to version 9.3.27-SNAPSHOT 2019-04-03 18:46:31 -05:00
Joakim Erdfelt dae476e369 Updating to version 9.3.26.v20190403 2019-04-03 18:16:32 -05:00
Joakim Erdfelt 2ccde9772b Undoing bad release-9.3.26 2019-04-03 18:11:16 -05:00
Simone Bordet a18c2c49f9 Issue #3464 - Split SslContextFactory into Client and Server
Fixed a couple of places where Server was used instead of Client.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-04-03 19:24:14 +02:00
Greg Wilkins 9f4b3542cb Updating to version 9.3.27-SNAPSHOT 2019-04-03 17:32:08 +11:00
Greg Wilkins 7ec6d2fb32 Updating to version 9.3.26.v20190403 2019-04-03 13:06:51 +11:00
Simone Bordet 6fb243ff6c Issue #3464 - Split SslContextFactory into Client and Server
Introduced SslContextFactory subclasses Client and Server.
Replaced all usages of SslContextFactory with either Client or Server
as required.

Refactored configuration checking so that warnings are not emitted
when non necessary.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-21 14:42:42 +01:00
Simone Bordet bfc5b1fac5 Issue #3180 - Review client support for Unix sockets.
Reviewed the implementation.
Got rid of the single channel stored in the HttpClientTransport.
Re-enabled tests on the Unix socket transport.
Updated JNR to 0.22.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-19 17:37:12 +01:00
Simone Bordet 23da561fec Fixes #3411 - HttpClient does not timeout during multiple redirection.
Updates after review.
Removed special logic to test for same URI redirection,
so it will fall back into the normal case where redirects
are counted against a maximum.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-15 09:48:49 +01:00
Simone Bordet 4eb6094f82 Fixes #3411 - HttpClient does not timeout during multiple redirection.
Removed timeout after copying the request in case of redirects
(and authentications), to avoid that the timeout listener is
notified of intermediate exchanges and resets the timeout.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-07 16:04:18 +01:00
Simone Bordet 057575f1cb Issue #3373 - OutOfMemoryError: Java heap space in GZIPContentDecoder.
Modified jetty-client content decoding to be fully non-blocking;
this allows for a better backpressure and less usage of the buffer
pool.

Modified GZIPContentDecoder to aggregate decoded ByteBuffers in
a smarter way that avoids too many data copies and pollution of
the buffer pool with intermediate size buffers.

Removed duplicate test GZIPContentDecoderTest.

Improved javadocs and improved AsyncMiddleManServlet
to release buffers used by the GZIPContentDecoder.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-28 16:11:26 +01:00
Olivier Lamy c3719b2bab
Add jdk12 build in Jenkinsfile (#3376)
* add jdk12 build stage
* test last release of infinispan for jdk12 build
* fix upperBound dependency for jboss logging
* upgrade juniper to 5.4.0 and disable infinispan test if JRE.JAVA_12
* Fixed annotations to exclude any JDK > 11 for 3 tests.

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-27 12:37:21 +10:00
Joakim Erdfelt 9cdb59d4d7 Updating to version 9.4.16-SNAPSHOT 2019-02-15 13:35:15 -05:00
Joakim Erdfelt eb70b24016 Updating to version 9.4.15.v20190215 2019-02-15 11:53:00 -05:00
Simone Bordet ec3adb0c11 Issue #3350 - Do not expect to be able to connect to https URLs with the HttpClient created from a parameterless constructor.
This is a regression introduced by fixing #2817.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-13 09:37:05 +01:00
Simone Bordet d575091c08 Fixes #3178 - BufferingResponseListener does not clear buffer in onHeaders.
Updated javadocs to specify that the class is not reusable.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-08 13:35:40 +01:00
Simone Bordet 8964608bfc Fixes #3154 - Add support for javax.net.ssl.HostnameVerifier to HttpClient.
Added a SslHandshakeListener to SslConnection that performs
the host name verification (only on the client) if the
HostnameVerifier has been configured in SslContextFactory.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-05 15:48:17 +01:00
Simone Bordet 9af4707556 Issue #3234 - AuthenticationProtocolHandler should not cache the failed results.
Fixed failing test.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-02 18:56:58 +01:00
Simone Bordet 33bceb3cc8 Fixes #3234 - AuthenticationProtocolHandler should not cache the failed results.
Now only caching authentication results for 2xx and 3xx codes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-01 12:21:21 +01:00
Simone Bordet 66873e8637 Code cleanups.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-01 12:20:22 +01:00
Simone Bordet fe5b7be7f6 Fixes #3293 HttpClientTLSTest.testNoCommonTLSProtocol() fail with jdk 11.0.2.
Updated to force TLS 1.3 vs TLS 1.2, rather TLS 1.2 vs TLS 1.1.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-01-25 17:02:00 +10:00
Olivier Lamy 9b7afd8a03
Happy new year!! (#3232)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-01-01 11:52:16 +10:00
Greg Wilkins 041e8fd9cf Issue #3038 SSL Connection Leak
Don't call  handleContentMessage after content call if the content call
returns true.

This is a slight bending of the parser contract to work around the current
client interpretation that a true return will prevent other events from being
delivered.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-21 17:28:40 +01:00
Greg Wilkins 8c4ee8496f
Jetty 9.4.x 3038 ssl connection leak (#3121)
Issue #3038 - SSL connection leak.

Fixed SSL spin caused when fill had NEED_WRAP, but a flush/wrap
produced 0 bytes and stayed in NEED_WRAP

Removed check of isInputShutdown prior to filling that allowed EOF to
overtake data already read.

Fix for leak by shutting down output in HttpConnection if
filled -1 and the HttpChannelState was no longer processing
current request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-20 13:53:42 +01:00
Joakim Erdfelt 29fd18e046 Updating to version 9.4.15-SNAPSHOT 2018-11-14 16:42:40 -06:00
Joakim Erdfelt c4550056e7 Updating to version 9.4.14.v20181114 2018-11-14 15:19:10 -06:00
Simone Bordet f2ed692a1b
Merge pull request #3099 from eclipse/jetty-9.4.x-HttpClient-dump-improvements
Fixes Issue #3103 - HttpClient buffer leak found by dump improvements

The leak problem was an additional, unnecessary, call retain() in ResponseNotifier.notifyContent() that was leaking `ByteBuffer`s.
2018-11-13 18:04:17 +01:00
Greg Wilkins 25914e4776 Issue #3103
use consumer to configure test HttpClient

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-13 17:15:59 +01:00
Greg Wilkins d1f52d1534 Issue #3103
review results

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-13 16:57:26 +01:00
Greg Wilkins 78a775396e Issue #3103
delay setting transport.setHttpClient until late in doStart
Do not add DumpableCollection as a bean

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-13 16:52:04 +01:00
Greg Wilkins 859004bef4 Issue #3103
Fixed buffer leak
Only warn if HttpClient setters are called after start

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-13 16:42:12 +01:00
Greg Wilkins d0afc63cd5 Fixing HttpClient tests to configure before start 2018-11-13 14:22:19 +01:00
Greg Wilkins fa38868406 use setters from doStart
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-13 10:37:42 +01:00
Greg Wilkins 26eecd6f8e HttpClient Dump Improvements
Add or update beans in constructor or setter rather than in doStart

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-13 10:32:17 +01:00
Joakim Erdfelt a903017f5f Updating to version 9.4.14-SNAPSHOT 2018-11-11 21:06:50 -06:00
Joakim Erdfelt 49123a3313 Updating to version 9.4.13.v20181111 2018-11-11 20:02:42 -06:00
Greg Wilkins 59dffebd1c
Revert backport of HttpClient executor bean handling. (#3088)
Revert to the not-so-good bean handling for the HttpClient executor
Added TODOs so that the bean handling can be updated in future.
Deprecated Websocket client setters that hide dependency on internal HttpClient instance.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-11 16:07:41 +01:00
Simone Bordet f814354bb5 Issue #3085 - Restore Dump methods for backwards compatibility reasons.
Restored removed methods to maintain backwards compatibility.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-11-09 17:47:46 +01:00
Greg Wilkins 4a9265d4b4 backports from 10.0.x websocket refactor
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-03 17:53:32 +01:00
Greg Wilkins 0fe4b8aa34 increased timeouts to check for flaky test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-11-01 17:35:21 +01:00
Simone Bordet b70323d55f Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2796-http2_max_concurrent_streams'. 2018-10-29 19:05:35 +01:00
Greg Wilkins 15e1c73f9c
Cleanup the dump implementation (#2998)
* Cleanup the dump implementation
* improved the clarity of utility methods for dump and updated most dump methods
* fixed upgrade filter dump
* Improved dump after review
* Moved dumpObjects to Dumpable
* implemented dumpBeans with dumpObjects
* less verbose dump
* Dump streams
* fixed dump test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-22 11:53:59 +11:00
Simone Bordet 276fa7e86b Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2796-http2_max_concurrent_streams', 2018-10-18 16:56:13 +02:00
Simone Bordet cec84cf1bf Issue #2796 - Max local stream count exceeded when request fails.
Reviewed other possible places where max local stream count may
overflow.

Fixed handling of HTTP/2 stream idle timeouts.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-09 15:53:53 +02:00
Greg Wilkins 319766a70c Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x 2018-10-05 18:56:49 +10:00
Greg Wilkins 166eeaa1f6
Jetty 9.3.x #2954 report cause (#2959)
Issue #2954 Report badmessage cause

Pass BadMessageException from parser to HttpReceiverOVerHTTP

This change has already mostly been made in 9.4, so essentially this is a back port.  However the
primary signature of HttpParser.Handler for badMessage has not been changed and a default method
used to handle the cause. This avoids breaking any usages of the interface.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-10-05 18:36:35 +10:00
Simone Bordet 20db6700c0 Fixes #859 - Stack overflow error in jetty high level API.
Now executing the call to abort() so that the stack overflow is avoided.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-03 18:24:59 +02:00
Simone Bordet 462668e80a Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Running tests only on JDK 11, as apparently other JDKs have problems
with AES encryption/decryption.
Another hypothesis is that Kerby does AES encryption differently from
what earlier JDKs expect.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-02 21:54:05 +02:00
Simone Bordet 06430f1b04 Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Restored behavior where authentication results are stored
no matter the response status.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-02 16:10:52 +02:00
Simone Bordet 9bb34f2758 Merged 'jetty-9.4.x' into 'jetty-9.4.x-2868-spnego_client'. 2018-10-02 15:17:41 +02:00
Simone Bordet 103b1292ea Fixed annotations on tests that should run on specific JDK versions.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-02 15:16:58 +02:00
Simone Bordet 6b5a46b63b Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Avoid hardcoded KDC port in tests.
Updated Krb5LoginModule options with refreshKrb5Config=true,
to make sure the KDC configuration is re-read for every test.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-02 12:01:25 +02:00
Simone Bordet 27efa6e2ad Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Added client-side classes javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-02 11:24:45 +02:00
Simone Bordet 2b11d30a45 Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Renamed server-side classes and added javadocs.
Deprecated old server-side classes in favor of the new ones.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-09-28 09:29:52 +02:00
Simone Bordet eb00e6c7c6 Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2868-spnego_client' 2018-09-28 08:59:46 +02:00
Simone Bordet e1905e6961 Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-09-19 18:47:39 +02:00
Simone Bordet 2e65186c95 Issue #2868 - Adding SPNEGO authentication support for Jetty Client.
Implemented client-side SPNEGO authentication.
Reimplemented server-side SPNEGO authentication.
Added tests to verify behavior.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-09-14 19:48:39 +02:00
Joakim Erdfelt 00843c8ed9 Issue #2901 - Moving Http Upgrader to Http Conversation
+ Solves for Authentication and Redirect

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-09-12 14:35:01 -05:00
Joakim Erdfelt bcb5da0224 Minor correction in JRE execution for SslBytesClientTest now that Java 12-ea's are out 2018-09-07 09:55:37 -05:00
Simone Bordet f3fb290b2a Fixed test to not run on JDK 11 due to TLS 1.3.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-09-06 11:29:14 +02:00
Joakim Erdfelt a3f1592c50 Issue #2431 - Upgrade to Junit 5 (#2436)
+ Changes needed for new Junit 5
+ Migrating from Vintage junit API to Jupiter junit API
+ Relies on SNAPSHOT jetty-test-helper
  - this will be a formal release once this issue has been
    resolved satisfactory
+ Have jenkins always pull latest SNAPSHOT for each build
+ Adding jetty.snapshots repository
+ Using surefire 2.22.0 per advice from junit
+ Ensuring <reuseForks>true</reuseForks> to work around issue junit-team/junit5#801
+ Disabling <forkMode>always</forkMode> in maven-surefire-plugin
  due to bug https://github.com/junit-team/junit5/issues/801
+ OSGi tests must remain at vintage due to PaxExam
+ Moving from vintage TestingDir to jupiter WorkDir
+ Fixing imports to use jupiter, not vintage
+ Migrating vintage ExpectedException to jupiter assertThrows
+ Migrating vintage TestName to jupiter TestInfo
+ Migrating @RunWith(Parameterized.class)
  to @ParameterizedTest with Argument Sources
+ Migrating assertTrue(val.contains(needle))
  to assertThat(val, containsString(needle))
+ Aligning junit versions per recommendations from @sormuras
+ Adjusting parameter order change for assertEquals()
+ Test LifeCycle Annotation Migration

junit 4      | junit 5 / jupiter
------------ | -----------
@Before      | @BeforeEach
@After       | @AfterEach
@BeforeClass | @BeforeAll
@AfterClass  | @AfterAll

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-09-05 10:07:17 +10:00
Jesse McConnell 863a19bccf
Updating to version 9.3.26-SNAPSHOT 2018-09-04 17:23:31 -05:00
Jesse McConnell 3ce520221d
Updating to version 9.3.25.v20180904 2018-09-04 16:08:21 -05:00