Commit Graph

2461 Commits

Author SHA1 Message Date
Matthias Perktold f901efc413 Issue #2662 - Unnecessary boxing conversions
Signed-off-by: Matthias Perktold <tias251@gmail.com>
2018-06-13 16:20:12 +02:00
Greg Wilkins bf8dd121b0 reduced test race
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-05-18 10:20:47 +10:00
Simone Bordet d8795350a4 Issue #2525 - Clean up SharedBlockingCallback.
Cosmetics.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-15 17:05:24 +02:00
Simone Bordet b4f2e6ddea Issue #2525 - Clean up SharedBlockingCallback.
Improved tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-14 12:11:10 +02:00
Simone Bordet a719c29b40 Issue #2525 - Clean up SharedBlockingCallback.
Improved test logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-14 12:08:33 +02:00
Simone Bordet 317a8a5c66 Issue #2525 - Clean up SharedBlockingCallback.
Small cleanups and added test for thread interruption.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-14 10:27:34 +02:00
Greg Wilkins 625d1f7726 Issue #2525 Clean up SharedBlockingCallback
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-05-13 23:11:38 +10:00
Simone Bordet 0374d40cae
Issue #2439 - Remove HTTP/2 data copy. (#2444)
* Issue #2439 - Remove HTTP/2 data copy.

Implemented reference counting for the network buffer, with the
semantic that calling succeeded() on callbacks decrements the
reference count.
Introduced interface Retainable, used by the client when notifying
multiple application content listeners.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-05-09 09:39:57 +02:00
Joakim Erdfelt 1732ffca51 Updating to version 9.4.11-SNAPSHOT 2018-05-03 11:48:05 -05:00
Joakim Erdfelt daa59876e6 Updating to version 9.4.10.v20180503 2018-05-03 10:55:19 -05:00
Joakim Erdfelt 1f835b9f23 Issue #2498 - new QTP.removeThread(Thread) method (#2499)
+ Adding removeThread(Thread) to allow instrumentation
  libraries to track removal of threads from Pool.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-05-03 07:32:49 +10:00
Greg Wilkins 97ec0b078d Better toString on ExecutorThreadPool #2478
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-04-26 14:47:31 +10:00
Simone Bordet 0a4d62c91d
Issue #2468 - EWYK concurrent produce (#2477)
Fixes #2468 - EWYK concurrent production.

Fixed the case when a task throws an exception, which causes
the thread that ran the task to continue production, even
when it should not.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-25 17:59:58 +02:00
Greg Wilkins 67ebdea11b Directly set warnAt to minThreads #2464
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-04-20 08:12:34 +10:00
Greg Wilkins 11854f502c Directly set warnAt to minThreads #2464
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-04-20 08:10:20 +10:00
Olivier Lamy c7e78ae896
update logging versions #2461 (#2465)
* update logging versions #2461

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-04-19 15:45:11 +10:00
Greg Wilkins 6d0ff04dab Directly set warnAt to minThreads #2464
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-04-19 15:38:22 +10:00
Simone Bordet fac93fa7f8 Fixes #2451 - Review ReservedThreadExecutor.getAvailable().
Fixed by having getAvailable() returning _stack.size().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-17 16:30:06 +02:00
Olivier Lamy f36eba4577
class.newInstance is deprecated #2435 (#2437)
* Class.newInstance() is deprecated in Java 9+ #2435

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-04-17 19:07:20 +10:00
Simone Bordet 7629a8f98f
Fixes #2425 - Review BufferUtil.isMappedBuffer(). (#2432)
Now explicitly using a _mappedBuffer field in
CachedContentFactory.CachedHttpContent.
Deprecated BufferUtil.isMappedBuffer().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-12 10:36:57 +02:00
Joakim Erdfelt ceded0bbae Issue #2413 - Using Instant.toString() to be consistent with timestamp
Example output:

JDK 8:

2018-04-04 22:30:25.578:INFO:oejs.Server:main: jetty-9.4.10-SNAPSHOT; built: 2018-04-04T22:22:03.202Z; git: 2b32f82aeb64acc6105c08d8a7a141279f8b91d0; jvm 1.8.0_131-b11

JDK 9:

2018-04-04 22:29:39.035:INFO:oejs.Server:main: jetty-9.4.10-SNAPSHOT; built: 2018-04-04T22:22:03.202Z; git: 2b32f82aeb64acc6105c08d8a7a141279f8b91d0; jvm 9+181

JDK 10:

2018-04-04 17:29:07.568:INFO:oejs.Server:main: jetty-9.4.10-SNAPSHOT; built: 2018-04-04T22:22:03.202Z; git: 2b32f82aeb64acc6105c08d8a7a141279f8b91d0; jvm 10+46

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-04-04 17:32:20 -05:00
Joakim Erdfelt 9147e408c8
Merge pull request #2392 from eclipse/jetty-9.4.x-issue-2387-uriutils-jarfile
Issue #2387 - fixing URIUtil.equalsIgnoreEncoding() with jar:file:// uris
2018-04-04 06:16:35 -05:00
Greg Wilkins c41b6b7aab
Merge pull request #2332 from eclipse/jetty-9.4.x-1027-Multipart
## SearchPattern
New class which does a fast search for patterns within strings and arrays of bytes using an implementation of the Boyer–Moore–Horspool algorithm. This was written to be used in the new MultiPartParser class to search for delimeter boundaries.

## MultiPartParser
New class which uses the SearchPattern to parse a MultiPart Mime given a ByteBuffer. Written in a non-blocking style so can be used asynchronously (although not currently be being used this way).

## MultiPartFormInputStream
New class which uses the MultiPartParser to parse a MultiPart Mime input stream into a Collection of Parts. This class is in org/eclipse/jetty/http and is designed to replace org/eclipse/jetty/util/MultiPartInputStreamParser.

## MultiPartInputStreamParser and Non Compliances
This class has been deprecated and replaced by org.eclipse.jetty.http.MultiPartFormInputStream. It accepts formats non compliant with the RFC that the new MultiPartFormInputStream does not accept. When this occurs violations are recorded by the method getNonComplianceWarnings().

## MultiParts
New interface to allow switching between the different implementations. This allows MultiParts to function in two different modes. The LEGACY implementation using the UTIL parser which may parse forms containing non compliances with the RFC, and the RFC7578 implementation using the new and faster HTTP parser. This file contains the implementations of MultiParts for HTTP and UTIL parsers as nested classes which are used by Request.

## Request
Changed to use the new MultiParts interface instead of the MultiPartInputStreamParser class. with a method called newMultiParts which will construct a MultiPart using one of the HTTP or UTIL implementations depending on what compliance mode is set.

## Jetty Test Webapp Dump Servlet
Code added to display parts while running the dump test webapp if MuliPart form is submitted.

## MultiPartBenchMark
JMH Benchmark of the HTTP multipart parser vs the UTIL multipart parser.

testLargeGenerated parses a 10MB file of random binary data.
testParser parses a series of small multipart forms captured by a browser.
```
# Run complete. Total time: 00:02:09

Benchmark                              (parserType)  Mode  Cnt  Score   Error  Units
MultiPartBenchmark.testLargeGenerated          UTIL  avgt   10  0.252 ± 0.025   s/op
MultiPartBenchmark.testLargeGenerated          HTTP  avgt   10  0.035 ± 0.004   s/op
MultiPartBenchmark.testParser                  UTIL  avgt   10  0.028 ± 0.005   s/op
MultiPartBenchmark.testParser                  HTTP  avgt   10  0.015 ± 0.006   s/op
```
2018-04-04 17:30:36 +10:00
Lachlan Roberts 1c35324f5b Fixed some javadoc errors and warnings
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-04 09:46:50 +10:00
Greg Wilkins 85f300d264 fixed javadoc warning
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-04-04 08:50:03 +10:00
Lachlan Roberts 13b15e3566 Resolved Charset Issues and Reworked Request.MultiPartInputStream
Changed Request.MultiPartInputStream to an interface called MultiParts where there is an implementation for both the HTTP and UTIL parsers.

Resolved some issues with default charsets in regards to request.setCharacterEncoding and the _charset_ part for issue #2398.

Changed HTTP parser to operate the same as UTIL parser in situtions with parts not of type form-data or without name field. HTTP parser was ignoring these parts, UTIL parser was throwing exceptions.

Replaced the context attribute with a field in MultiParts.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-03 15:24:54 +10:00
Lachlan Roberts be2d6ebb29 Merge remote-tracking branch 'eclipse/jetty-9.4.x' into jetty-9.4.x-1027-Multipart 2018-04-03 12:36:54 +10:00
Mat Booth c316cf1cfe Make the requirement on "osgi.serviceloader.processor" optional (#2377)
This allows Eclipse to continue to make use of jetty-* bundles
without requiring the presence of Apache Aries.

This fixes a problem introduced by the resolution to #2164 and
the same solution is used as in 10cdf16

See also the discussion at Eclipse:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=532294

Signed-off-by: Mat Booth <mat.booth@redhat.com>
2018-04-03 12:25:50 +10:00
Joakim Erdfelt c5d4897a5f Issue #2387 - fixing URIUtil.equalsIgnoreEncoding() with jar:file:// uris
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-28 10:48:28 -05:00
Simone Bordet a28ec963d1 Issue #2388 - AtomicBiInteger.compareAndSet(long,int,int) not using encoded parameter.
Using capital 'L' for long literals to avoid confusion with '1'.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-28 11:36:50 +02:00
Greg Wilkins 56fc71a54a fix sign extension #2388
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-28 11:05:49 +11:00
Simone Bordet ef48bc6f58 Fixes #2388 - AtomicBiInteger.compareAndSet(long,int,int) not using encoded parameter.
Fixed method, added Javadocs and cleaned up code with a few renamings
to better comply with AtomicLong naming.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-28 00:37:21 +02:00
Greg Wilkins 4a8c586760 removed duplicated test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-27 13:03:23 +11:00
Lachlan Roberts ce3698ea75 Merge remote-tracking branch 'eclipse/jetty-9.4.x-1027-Multipart' into jetty-9.4.x-1027-Multipart 2018-03-27 09:19:47 +11:00
Lachlan Roberts ca534d08fb Minor changes to code, documentation and formatting after review.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-27 09:11:57 +11:00
Greg Wilkins 2cc26f0e71 Merge branch 'jetty-9.4.x' into jetty-9.4.x-1027-Multipart 2018-03-23 09:34:52 +11:00
Joakim Erdfelt c0dcf9a0a2 Issue #1027 - multipart testing examples
Adding raw/binary gitattributes

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-21 18:07:30 -05:00
Greg Wilkins 8312f4567b Merge branch 'jetty-9.4.x' into jetty-9.4.x-1027-Multipart 2018-03-21 16:50:29 +11:00
Lachlan Roberts 0f28107a9c Implemented warnings for old MultiPartInputStreamParser when successfully parsing content not conforming to RFC.
Modified tests in new MultiPartInputStreamTest which were failing because they didn't comply with RFC.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-21 16:24:21 +11:00
Joakim Erdfelt c3cc138a3b Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
Joakim Erdfelt 1f8159b1e4 Updating to version 9.4.9.v20180320 2018-03-20 07:18:24 -05:00
WalkerWatch 534b8ea38b Add edit warning for .mod files. Resolves #173 2018-03-15 13:23:42 -04:00
Greg Wilkins 4ce7e9591b Safer simpler version parsing #2284
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-15 22:49:20 +11:00
Joakim Erdfelt 3f33013fb3
Merge pull request #2331 from eclipse/jetty-9.4.x-2284-saferVersionParse
Safer simpler version parsing #2284
2018-03-15 04:44:04 -05:00
Greg Wilkins afc820c7f9 fixed test by removing extra produce
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-15 10:19:49 +11:00
Greg Wilkins a41f7bd927 More debug in test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-14 16:57:15 +11:00
Greg Wilkins a5d3b01659 Merge branch 'jetty-9.4.x' into jetty-9.4.x-1027-Multipart 2018-03-14 16:25:56 +11:00
Greg Wilkins a810ecf67e Fixed test with atomic
the --task was not protected with a memory barrier, so different producing threads could contend on the field.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-14 15:59:37 +11:00
Greg Wilkins a77a127da0 tests and fixes for binary keys and content
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-14 15:02:56 +11:00
Greg Wilkins 01e8cf440e Safer simpler version parsing #2284
For #2284 no longer parse the optional detail of the java version.
Parse failures will result in a guessed JVM platform 8

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-14 10:12:44 +11:00