Commit Graph

17742 Commits

Author SHA1 Message Date
Joakim Erdfelt cef67d9a6c
Merge pull request #4423 from eclipse/jetty-9.4.x-3730-websocket-scope-cleanup
Issue #3730 - Cleaning up Scopes in WebSocketClient
2019-12-19 16:10:16 -06:00
Simone Bordet af7cb94528
Merge pull request #4428 from eclipse/jetty-9.4.x-4427-httpclient_retried_request_duplicates_cookies
Fixes #4427 - Retried request duplicates cookies.
2019-12-19 22:00:15 +01:00
Joakim Erdfelt d1d8f9a779
Merge pull request #4438 from jglick/patch-1
Reduce log level of message
2019-12-19 14:59:57 -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
Joakim Erdfelt c2c2c56a02
Issue #3730 - EventDriverFactory and SessionFactory setters
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-19 13:46:12 -06:00
Joakim Erdfelt 26fde02c55
Issue #3730 - Updating invalid test assertion
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-19 12:43:49 -06:00
Joakim Erdfelt 94988596a1
Issue #3730 - Further updates from PR Review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-19 12:33:43 -06: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
Simone Bordet e4f1106f09 Fixes #4421 - HttpClient support for PROXY protocol.
Fixed visibility of ProxyProtocolConnection.
Must be protected because it's the return type
of protected methods.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 10:11:54 +01: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
Joakim Erdfelt bb79f3e6e0
Issue #3730 - Collapsing now redundant private Constructor
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-18 15:33:23 -06:00
Joakim Erdfelt e02ef3efdd
Issue #3730 - Making new Constructor private
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-18 14:43:53 -06:00
Joakim Erdfelt 9da1820f13
Issue #3730 - Removing HttpContainerScope
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-18 14:38:37 -06:00
Simone Bordet fcc18b0530
Merge pull request #4429 from eclipse/jetty-9.4.x-4421-httpclient_proxy_protocol2
Fixes #4421 - HttpClient support for PROXY protocol.
2019-12-18 00:50:10 +01:00
Simone Bordet bea7f1a5cf Fixes #4421 - HttpClient support for PROXY protocol.
Improved support for Type-Length-Value (TLV) objects.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-17 23:26:28 +01:00
Simone Bordet 91239b01e3 Fixes #4427 - Retried request duplicates cookies.
Introduced HttpRequest.normalized() to test and set whether
the request has already been normalized.
Added test case and few cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-17 20:16:46 +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
Greg Wilkins 9f93577054
Update Notice (#4395)
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-12-17 07:40:19 +11:00
Simone Bordet fa973a2df8
Merge pull request #4380 from eclipse/jetty-9.4.x-4374-httpclient_content_listener
Fixes #4374 - Jetty client: Response.AsyncContentListener.onContent i…
2019-12-16 18:01:27 +01:00
Joakim Erdfelt 7d65183e2c
Issue #3730 - Cleaning up Scopes in WebSocketClient
+ Introducing HttpContainerScope to track HttpClient specific
  ByteBufferPool, SslContextFactory, and Executor.
+ New private WebSocketClient constructor that use HttpContainerScope
+ Deprecated many constructors as irrelevant now that HttpClient
  is an option to create a WebSocketClient.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-13 13:44:57 -06:00
Joakim Erdfelt cf7f6a52f5
Merge pull request #4417 from eclipse/jetty-9.4.x-4415-gziphandler-large-stream-support
Issue #4415 - Addressing Gzip Decoding of large files
2019-12-12 14:11:31 -06:00
Joakim Erdfelt 36d06d016d
Issue #4415 - Addressing Gzip Decoding of large files
+ Addressing PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-12 13:23:44 -06:00
Joakim Erdfelt 1e810d370f
Issue #4415 - Addressing Gzip Decoding of large files
+ Addressing PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-12 11:58:44 -06:00
Joakim Erdfelt 2b58379f88
Issue #4415 - Addressing Gzip Decoding of large files
+ Now applying proper RFC 1952 ISIZE check.
+ Bit shifting is done with Longs against Long value.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-12-11 14:38:42 -06:00
Simone Bordet fe1a3c67a1
Merge pull request #4412 from eclipse/jetty-9.4.x-4411-server_spin_incomplete_request
Issue #4411 - Jetty server spins on incomplete request.
2019-12-11 13:47:37 +01:00
Simone Bordet 8e875ab7a4 Issue #4411 - Jetty server spins on incomplete request.
Updated FastCGI code to pass the test.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-11 13:02:23 +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
Jan Bartel 0e6a1ce76b
Issue #4402 Fix NPE in JettyRunWarExplodedMojo (#4406)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-12-10 12:29:40 +11:00
Simone Bordet 2052b6e390
Merge pull request #4404 from eclipse/jetty-9.4.x-4385-restore-unsupported-exception-base-sni
Issue #4385 - Reverting WARN log in favor of IllegalStateException
2019-12-07 12:44:05 +01:00
Simone Bordet 364ded9f73
Merge pull request #4391 from eclipse/jetty-9.4.x-3512-httpclient_multipart_close
Fixes #3512 - File descriptor is not released after zip file uploaded…
2019-12-07 12:38:40 +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
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
Simone Bordet 45fcd80182
Merge pull request #4393 from eclipse/jetty-9.4.x-4392-handle_quiet_exception_in_asyncError
Fixes #4392 - Suppress logging of QuietException in HttpChannelState.…
2019-12-04 15:33:04 +01:00
Simone Bordet b82dc247e5
Merge pull request #4394 from eclipse/jetty-9.4.x-4366-socks_hostname_verification
Fixes #4366 - HTTP client uses SOCKS4 proxy hostname for SSL hostname…
2019-12-04 15:11:25 +01:00
Simone Bordet 2ef02da1bd Fixes #4366 - HTTP client uses SOCKS4 proxy hostname for SSL hostname verification.
Now setting correctly the host and port to the server destination
_after_ the SOCKS tunnel is established, similarly to what is done
for the HTTP CONNECT tunnel.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-03 21:40:55 +01:00
Joakim Erdfelt a5e31dce20
Merge pull request #4386 from eclipse/jetty-9.4.x-4385-sslcontextfactory-sni-noexception
Issue #4385 - Limit new UnsupportedOperationException to direct SslContextFactory usage
2019-12-03 10:05:56 -06: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
Simone Bordet 9628ea3bc1 Fixes #3512 - File descriptor is not released after zip file uploaded via jetty-client.
In case of multiple parts only the last iterator was closed.
Now, every part's iterator is closed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-03 11:36:53 +01:00
Jan Bartel db9ad2fcec
Issue #4323 Ensure QoSFilter handles IllegalStateException (#4372)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-12-03 12:16:24 +11: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
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 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
Mat Booth c9a65c4676 Allow building against newest version of maven-artifact-transfer (#4381)
In later versions of maven-artifact-transfer the package names have
been refactored, this change accomodates for that.

Signed-off-by: Mat Booth <mat.booth@redhat.com>
2019-12-03 07:08:01 +10: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