Commit Graph

17099 Commits

Author SHA1 Message Date
Olivier Lamy 6b07bd23c8
Issue #3918 use Jetty version from pom if not found (#3919)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-07-31 20:11:20 +10:00
Joakim Erdfelt 95298d89e9
Merge pull request #3910 from eclipse/jetty-9.4.x-3840-pathresource-byterange
Issue #3840 Static resource byte-range support performance
2019-07-30 20:04:06 -05:00
Joakim Erdfelt dc4b7b1791
Merge pull request #3889 from eclipse/jetty-9.4.x-3888-huge-resources
Issue #3888 - Huge file Resources behaviors
2019-07-30 20:03:34 -05:00
Joakim Erdfelt 602c44ec96 Issue #3888 - Adding comment from PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 20:02:18 -05:00
Joakim Erdfelt 7a867c0ff0 Issue #3840 - Applying ByteBuffer niggle from PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 19:59:49 -05:00
Joakim Erdfelt ed8d9cabff Issue #3840 - Simplifying ResourceService
+ Removing unnecessary variables (per PR review)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 17:12:38 -05:00
Joakim Erdfelt 43f9553a5e Issue #3840 - Adding more robust PathResource.writeTo()
+ Using techniques from SeekableByteChannelRangeWriter
  with variant for -1 count parameter

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 17:12:07 -05:00
Joakim Erdfelt b2ec6dd1af Issue #3840 - Fixing for InputStream.skip() behaviors
+ Reset progress on any positive skip value
+ Throw IOException(EOF) for any negative skip value

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 17:11:27 -05:00
Joakim Erdfelt fd9ec22876 Issue #3840 - Adding Default FileSystem check to PathResource
+ Construction of PathResource now tests if path belongs
  to the Default FileSystem or not.  This important info
  for later actions against the PathResource that would
  need to know the File object for the Path object.
  Non-Default FileSystem == null
  Default FileSystem == Path.toFile()

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 13:58:09 -05:00
Joakim Erdfelt 5129f2c9ff Issue #3840 - InputStream.skip() rules must be followed
+ break out if progress isn't made, loop if not enough
  progress is made

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-30 13:00:03 -05:00
Joakim Erdfelt 6790e8d977
Merge pull request #3915 from cowwoc/issue3900
Added Javadoc for HttpConfiguration sendDateHeader
2019-07-30 11:55:47 -05:00
Gili Tzabari 33bd4e6bc0 Updated PR in response to comments.
Signed-off-by: Gili Tzabari <cowwoc2020@gmail.com>
2019-07-30 12:50:45 -04:00
Gili Tzabari d3cbd36fe0 Added Javadoc.
Signed-off-by: Gili Tzabari <cowwoc2020@gmail.com>
2019-07-30 11:46:30 -04:00
Olivier Lamy 1b6bf389d6
Jetty 9.4.x pax exam upgrade for central repo https, pre download all artifacts for maven its (#3902)
* ensure we use local repository first to avoid download, upgrade pax versions
pre download artifacts to avoid download by maven invoker its

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

* force using local repository first see https://issues.apache.org/jira/browse/MINVOKER-249

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

* use local setttings to use mirrors

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

* use https

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

* install build resources first to avoid checkstyle build issue

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

* downgrade pax-swissbox-framework as the pax exam seems to use this one and want to download it...

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

* fix enforcer rule RequireUpperBoundDeps...

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

* not used anymore

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

* force pax url to use provided settings via Jenkins withMvn

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

* renove debugging System.out

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

* version is defined in the project

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

* cleanup after Jan review comments

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-07-30 11:13:54 +10:00
mpe85 bb639817a3 Made loading of blobs from database more robust (#3895)
Signed-off-by: mpe85 <marco.perazzo85@gmail.com>
2019-07-29 14:33:40 +10:00
Simone Bordet a38ac923ac
Merge pull request #3909 from eclipse/jetty-9.4.x-3822-sslctxfactory_trustall_fails
Fixes #3822 - trustAll will not work on some servers.
2019-07-27 02:02:39 +03:00
Joakim Erdfelt 8601baa3cc Issue #3804 - PathResource should not use SPARSE hint always
+ SPARSE hint only applies to real os file systems or
  default file systems, not for all file systems.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-26 13:32:03 -05:00
Joakim Erdfelt e5bce5f7cd Issue #3840 - Static resource byte-range support performance
+ Reverting toFile().getInputStream() on PathResource
+ Adding RangeWriter concept for managing open resource
  across multiple range writes
+ RangeWriter implementation delegates to HttpContent behaviors
  Lookup is :
  - Direct Buffer
  - Indirect Buffer
  - ReadableByteChannel (as SeekableByteChannel)
  - InputStream
+ Adding unit tests for all RangeWriter implementation to ensure
  that they behave the same way everywhere.
+ Making ResourceService use new RangeWriter implementation
+ Existing DefaultServletRangeTest still works as-is

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-26 12:36:31 -05:00
Simone Bordet 4e0e962747 Fixes #3822 - trustAll will not work on some servers.
Made TRUST_ALL_CERTS implement X509ExtendedTrustManager,
so that it does not get wrapped in sun.security.ssl.AbstractTrustManagerWrapper,
which performs additional trust checks.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-26 15:57:53 +02: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
Simone Bordet 3be03db5e6 Improved logging.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-26 11:52:08 +02:00
Simone Bordet 873d1c6d7d Fixes #3601 - HTTP2 stall on reset streams.
The client reset wakes up threads blocked in
writes, but these may again attempt to write,
therefore blocking again.

Now we detect that the stream is not writable
and mark the transport as failed, so that
writes fail immediately without blocking.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-25 22:21:13 +02:00
Joakim Erdfelt 24b2ca4c32 Issue #3906 - Introducing Testcase to demonstrate issue
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-25 11:43:51 -05:00
Joakim Erdfelt 9e90c60f0e Issue #3888 - Fixing implementation of CachedContentFactory
+ ResourceCacheTest identified a bug in CachedContentFactory
  (a bad/reversed if statement)
+ Updated ResourceCacheTest to not rely on jetty-util src/test/resources

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-24 11:26:49 -05:00
Joakim Erdfelt 6fd8aeefde Issue #3888 - Adding HttpClient tests
+ Also applying changes from review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-23 15:24:33 -05:00
Simone Bordet 2629961e74 Fixes #3856 - Different behaviour with maxFormContentSize=0 if Content-Length header is present/missing.
Changes after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-23 22:01:13 +02:00
Simone Bordet d939c9435a Fixes #3856 - Different behaviour with maxFormContentSize=0 if Content-Length header is present/missing.
Fixed zero checks and exception messages.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-23 15:44:08 +02:00
Simone Bordet 1aaadea13d
Merge pull request #3865 from eclipse/jetty-9.4.x-3829-dont_send_empty_response_trailers
Fixes #3829 - Avoid sending empty trailer frames for http/2 responses.
2019-07-21 18:31:22 +03:00
Simone Bordet 40fc4ef340 Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2019-07-20 19:56:14 +02:00
Simone Bordet 6a0a2883ad Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2019-07-20 19:51:12 +02:00
Simone Bordet baa325d56c Updated ALPN version for JDK 8u221 and 8u222.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-20 19:43:20 +02:00
Joakim Erdfelt 122f994aaf Issue #3888 - Removing excessive "huge" per PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-19 10:39:03 -05:00
Joakim Erdfelt 446c3d7202 Issue #3888 - Fixing ServletRequest.getContentLength() behavior
+ For Content-Length values exceeding Integer.MAX_VALUE the return
  must be -1.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-19 10:35:35 -05:00
Joakim Erdfelt 8afc4464d5 Issue #3503 - Adding testcases for huge Content-Length behaviors
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-19 10:27:38 -05:00
Joakim Erdfelt f856ad41da Issue #3888 - For Resources exceeding maxCachedFileSize do not allocate
+ Only used Mapped ByteBuffers, ReadableByteChannel, or InputStream

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-19 10:25:04 -05:00
Joakim Erdfelt 36294ef0da Issue #3888 - Fixing for truncated long to int
+ Allowing CachedHttpContent._contentLengthValue actually hold
  the `long` resource size (for the 4G variant on test)
+ Allowing BufferUtil to not throw Exception if resource length
  is a positive value, but exceeds Integer.MAX_VALUE, opting instead
  to return a null to prevent excessive memory usage. (fixes the 10G
  variant of test)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-18 12:13:35 -05:00
Joakim Erdfelt aef58168d0 Issue #3888 - Adding testcase to demonstrate Huge file Resource issue
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-18 11:47:37 -05:00
Joakim Erdfelt f36358c631 Issue #3884 - Adding NullMessage to satisfy PR review
+ If an annotated Jetty WebSocket Endpoint doesn't have
  a handler for data types TEXT or BINARY then the
  new NullMessage (sink) is used for that specific data type
  to consume (quietly) those ignored Messages.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-18 08:04:17 -05:00
Joakim Erdfelt 02c49efc5f Issue #3884 - Adding testcase to satisfy PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-18 07:51:12 -05:00
Olivier Lamy 4ebf4b7477
Jetty 9.4.x invoker maven plugin use junit result files (#3887)
* invoker plugin can now generate junit report file so use that to ease reading of results

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-07-18 16:46:59 +10:00
Greg Wilkins d71a2d8f7d
Issue #3806 async sendError (minimal fix) (#3875)
* Issue #3806 async sendError

This is a minimal fix for the async race of sendError using isHandled
at the same time as the normal dispatch is exiting.

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

* Issue #3806 async sendError

Fixed isStreaming method in minimal fix (showing the need for actual
test harnesses).

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-07-17 23:25:30 +02:00
Joakim Erdfelt f4ce98b1c8 Issue #3884 - Pure @OnWebSocketFrame usage should not process Continuation events
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-17 15:51:35 -05:00
Joakim Erdfelt f7b212abb0 Issue #3884 - Pure WebSocketFrameListener should not process Continuation events
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-17 14:34:51 -05:00
Joakim Erdfelt f20d403480 Issue #3876 - Additional testcase
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-16 13:04:19 -05:00
Joakim Erdfelt ec9f4ef392 Issue #3876 - WebSocket Partial Listener testcases and fix
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-16 07:07:55 -05:00
Chris Walker 6f9495f5c1 Added additional note about SCIs and updating web.xml per #1466
Signed-off-by: Chris Walker <WalkerWatch@users.noreply.github.com>
2019-07-12 11:50:35 -04:00
Jan Bartel 4d4a7dc101 Issue #3870 Update to spifly 1.2.3
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-07-12 11:07:18 +02:00
Jan Bartel cc7b12571f Issue #1466 Update documentation.
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-07-12 10:46:01 +02:00
Olivier Lamy 71268ae687
make jetty-all build tested by ci build to avoid issue at release time (#3867)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-07-12 09:51:42 +10:00
Simone Bordet 9f84c1cb8e Fixes #3829 - Avoid sending empty trailer frames for http/2 responses.
Added guard against the supplier of trailers returning null.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-11 15:06:15 +02:00