* 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>
* Issue #3799 Programmatic listeners from ServletContextListeners.
Ensure programmatic listeners added from ServletContextListeners are
called.
Signed-off-by: Jan Bartel <janb@webtide.com>
* Issue #3799 add distribution test
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Applying XML restyling
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Reformatting pom.xml files
* Fixed empty string from line wraps
* Update intellij style to not do expression relative formatting. Reformatted code based on that.
* Increasing line split on Eclipse IDE Formatter to 512
* Restoring setting on internal default value.
+ IntelliJ will not export settings on things that set to their
internal default values.
We want to keep those values as a hedge against future default
value changes in future releases of IntelliJ.
* Fixing intellij codestyle
* do not allow single line simple methods
* misc checkstyle fixes
* re-exported with correct name and all values
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #3755 Annotation example cleanup
+ Created JettyDistribution class as common utility to locate a jetty distribution for examples.
+ Fixed ServerWithAnnotations to correctly use the test-spec-webapp
+ Added AttributeContainerMap as a better way to treat attribute values as beans. This avoids them appearing twice in a dump and always associates them with their key.
+ Added NamingDump and use it in EnvConfiguration and jetty-plus.xml so that a server dump will contain dumps of the server local tree and each contexts java:comp/env tree
+ Improved the dump format of NamingContext and WebAppContext
+ Improved the toString format of several associated classes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
+ Updating testcases to test requestURL as well.
+ Adding new testcases for X-Forwarded-Port modifying only
the port of an existing `Host:` header.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ StringUtil.replace()
+ StringUtil.replaceFirst()
+ StringUtil.sanitizeFileSystemPath()
Change existing usages of String.replace() to either
use new StringUtil.replace() or other methods elsewhere
that better suit that specific need.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
- do not parse MultiParts in constructor so the attribute can be set
- deleteParts in MultiPartFormInputStream from _parts MultiMap
- only add the MultiPartCleanerListener once per context
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Added support for the X-Forwarded-Port header.
Reimplemented header scanning using more efficient Trie and MethodHandles
Signed-off-by: Greg Wilkins <gregw@webtide.com>
## Ports the `ipaccess` being added as a module from jetty 10
you can now do `java -jar start.jar --add-to-start=inetaccess` to add
the inetaccess handler to your jetty config.
## Allows you to specify a list of connector names that the
`InetAccessHandler` applies to
This is important for those who run jetty using `start.jar` to make it
possible to do things like have an open HTTPS connector but a whitelist
restricted HTTP connector.
Example:
`etc/jetty-inetaccess.xml`
```
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
"http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="insertHandler">
<Arg>
<New id="InetAccessHandler"
class="org.eclipse.jetty.server.handler.InetAccessHandler">
<Call name="exclude"><Arg>127.0.0.128-127.0.0.129</Arg></Call>
<Call name="includeConnectorName"><Arg>http</Arg></Call>
</New>
</Arg>
</Call>
</Configure>
```
You can now
`java -jar start.jar --add-to-start=https`
and
`java -jar start.jar --add-to-start=inetaccess`
And you can now choose what inetaccess handler rules apply to http
versus https.
## Adds a basic `InetAccessHandler` Unit Test
Cover a few of the basic features of InetAccessHandler so it can have
some coverage.
Signed-off-by: Nicholas DiPiazza <nicholas.dipiazza@lucidworks.com>