jetty.project/tests
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
..
test-continuation Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
test-http-client-transport Merge branch 'release-9.4.9' into jetty-9.4.x 2018-03-21 16:33:56 -05:00
test-integration Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
test-jmx Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
test-loginservice Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
test-quickstart Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
test-sessions Jetty 9.4.x 2231 refactor session tests (#2382) 2018-03-28 20:14:15 +10:00
test-webapps Merge pull request #2332 from eclipse/jetty-9.4.x-1027-Multipart 2018-04-04 17:30:36 +10:00
pom.xml Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00