c41b6b7aab
## 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 ``` |
||
---|---|---|
.. | ||
test-continuation | ||
test-http-client-transport | ||
test-integration | ||
test-jmx | ||
test-loginservice | ||
test-quickstart | ||
test-sessions | ||
test-webapps | ||
pom.xml |