Commit Graph

1891 Commits

Author SHA1 Message Date
Joakim Erdfelt bdc54f03a5 Updating to version 9.4.35.v20201120 2020-11-20 15:05:50 -06:00
Lachlan Roberts 7bc4ee6509 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-WebSocketUpgradeFilter 2020-11-19 07:48:16 +11:00
Lachlan Roberts 6a83a261e1 Always add the default WebSocketUpgradeFilter as the first filter.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-11-18 21:27:25 +11:00
Joakim Erdfelt e9c6c942ea
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-11-17 09:12:50 -06:00
Joakim Erdfelt 314c65fb14
Issue #5539 - Adding StatisticsServlet tests in test-distribution
+ Updating module definition for JSON

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 12:31:28 -06:00
Joakim Erdfelt 683d9a9349
Issue #5539 - Updating StatisticsServlet accept processing per review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 09:10:24 -06:00
Joakim Erdfelt c9440357a7
Issue #5539 - Fixing javadoc
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 09:10:23 -06:00
Joakim Erdfelt cc952f3a3a
Issue #5539 - Adding query parameter accept variation
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 09:10:22 -06:00
Joakim Erdfelt b419db90c5
Issue #5539 - Cleanup, adding javadoc, etc.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 09:10:21 -06:00
Joakim Erdfelt 02f35deeaa
Issue #5539 - Deprecating 'xml' request parameter in StatisticsServlet
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 09:10:21 -06:00
Joakim Erdfelt 5362467e67
Issue #5539 - Proper StatisticsServlet output format via content negotiation
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-16 09:10:21 -06:00
Joakim Erdfelt 9e22260377
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-11-10 12:12:39 -06:00
Joakim Erdfelt 21c27f6370
Fixing checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-11-10 06:33:04 -06:00
Joakim Erdfelt a7ed2f072a
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-11-02 19:04:59 -06:00
Joakim Erdfelt edaadff55b Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
Joakim Erdfelt e46af88704 Updating to version 9.4.34.v20201102 2020-11-02 08:03:51 -06:00
Joakim Erdfelt 981b50df58
Merge pull request #5559 from eclipse/jetty-9.4.x-5555-NPE-NamedFilterMapping
Jetty 9.4.x 5555 npe named filter mapping
2020-11-02 07:57:18 -06:00
gregw 4c49ca5184 More cleanup for #5555
Some more cleanup for #5555
2020-11-02 14:08:46 +01:00
gregw 27f0c4141c Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-11-02 13:31:19 +01:00
Greg Wilkins b77ee515a5
Fixes #5555 NPE if Filter of named servlet (#5556)
Fixed #5555 NPE if there is a filter with a servlet name mapping, but a request is received for a servlet without a name match.
Added more simple tests for servlet and filter mappings
2020-11-02 13:30:52 +01:00
gregw 47b1583c7f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-11-02 10:58:06 +01:00
Simone Bordet 40fd98d6a9 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-11-02 10:47:03 +01:00
gregw f21c606f1d Fixes #5539 Stats XML format
Signed-off-by: gregw <gregw@webtide.com>
2020-11-02 10:45:45 +01:00
Simone Bordet a1b3d3319d
Merge pull request #5491 from eclipse/jetty-9.4.x-5488-jetty-dir.css
Fixes #5488 - jetty-dir.css not found when using JPMS.
2020-11-02 10:40:19 +01:00
gregw 365bab153c Fixes #5555 NPE if Filter of named servlet
Fixed #5555 NPE if there is a filter with a servlet name mapping, but a request is received for a servlet without a name match.
Added more simple tests for servlet and filter mappings
2020-11-02 10:19:08 +01:00
Greg Wilkins d3bdeefa1a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-10-28 18:01:56 +01:00
Greg Wilkins 7a0de6af3a
Fixes #5498 ServletHolder cleanup (#5514)
* Fixes #55498 ServletHolder cleanup

Various cleanups for #5498 including:
 + renaming multiple `_servlet` fields in inner classes to avoid confusion
 + better comments in prepare method to describe why it is needed
 + call prepare from Invoker servlet
 + The `_servlet` field is not set until after the servlet is initialized
 + Consistent wrapping of `SingleThreadedWrapper` now in `initServlet`
 + The `getServlet` method now looks the volatile `_servlet` to avoid locking if possible
 + The `handle` method now calls `getServletInstance` as servlet will have been initialized in `prepare`
 + Found and fixed race with making unavaiable servlet available again
 + fixed nanotime overflow
 + fixed several compiler warnings/suggestions
 + removed while true from unavailable servlet
 + Do not destroy servlets unless init has been called.
 + Added TODOs about calling predestroy on instances not created by the holder.
 + Do not destroy servlets unless init has been called.
 + Added TODOs about calling predestroy on instances not created by the holder.
 + improved dump and toString
2020-10-28 17:46:49 +01:00
Simone Bordet 4a4a73df2e Fixes #5488 - jetty-dir.css not found when using JPMS.
Moved jetty-dir.css from jetty-util to jetty-server,
so that it can be found by ResourceHandler when using JPMS.

Updated DefaultServlet to call a ResourceHandler method
to retrieve the stylesheet.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-22 16:48:27 +02:00
Joakim Erdfelt e726eefb0b Updating to version 9.4.34-SNAPSHOT 2020-10-20 18:55:39 -05:00
Joakim Erdfelt 1be6875565 Updating to version 9.4.33.v20201020 2020-10-20 18:28:51 -05:00
Joakim Erdfelt e12c3ce50b
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-10-16 08:11:42 -05:00
Joakim Erdfelt fdd880b66b
Issue #5451 - Cleanup of temp file cleanup.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-15 18:10:38 -05:00
Joakim Erdfelt dfa076fdb5
Merge pull request #5403 from eclipse/jetty-10.0.x-5401-move-httptester
Move HttpTester to jetty-http
2020-10-12 06:14:44 -05:00
gregw 94ef9342bb Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-10-07 23:48:38 +02:00
Greg Wilkins 721a05eb9d
Fixes #5378 Setting Holders during STARTING (#5397)
* Fixes #5378 Setting Holders during STARTING

Holders are now started/initialized if needed by a new utility method

* Fixes #5378 Setting Holders during STARTING

Holders are now started/initialized if needed by a new utility method
2020-10-07 23:22:55 +02:00
Joakim Erdfelt 857e888e8b
Issue #5401 - Move HttpTester to jetty-http
+ leaving jetty-http-tools alone

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-07 14:50:31 -05:00
gregw 911173f8f7 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-10-05 13:57:20 +02:00
Greg Wilkins c40b955e09
Issue #5022 Filter Cache cleanup (#5271)
* Issue #5022 Filter Cache cleanup

Issue #5022 Filter Cache cleanup:
 + Fixed many compiler warnings
 + removed old LazyList leftovers
 + Don't create holder string for source unless required
 + Only have a single type of chain, so it can be wrapped regardless of cache
 + Reverse mappings lists to make filter chain creation easier
 + build chain directly rather than build a list then a chain

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

* added comment to explain ordering

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

* More cleanups

* fixed toString format
turn off debug in OSGI test
2020-10-05 13:29:11 +02:00
gregw 094a25a405 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-10-05 12:29:00 +02:00
gregw 6d69e31439 Extra tests for #5378 2020-10-05 12:28:10 +02:00
Joakim Erdfelt 85e257fc98 Updating to version 9.4.33-SNAPSHOT 2020-09-30 11:53:09 -05:00
Joakim Erdfelt de97d26f7b Updating to version 9.4.32.v20200930 2020-09-30 11:03:24 -05:00
Joakim Erdfelt ad2446dd6c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-29 11:24:28 -05:00
Joakim Erdfelt 3423375a97
Issue #5357 - Updating to https://eclipse.org/ (#5358)
* Issue #5357 - Updating to https://eclipse.org/

 - Removing redundant <url> refs in pom.xml
 - Correcting bad indenting from merge
 - Correcting mailing list references
 - Correcting bugs.eclipse.org references
 - Correcting text file references
 - Correcting html references
 - Correcting further references
 - Correcting download.eclipse.org reference
 - Adding test for demo-base /proxy/current/
 - Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-29 11:02:32 -05:00
Joakim Erdfelt a8db28f706
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-17 06:29:01 -05:00
Joakim Erdfelt 59976dce54
Issue #5032 - Minimal Extensible Web App changes
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-17 05:58:06 -05:00
gregw d7b3d62982 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-09-07 15:59:27 +02:00
Greg Wilkins 7ecf42e3f8
Issue #5162 CDI embedded integration improvements (#5177)
* Issue #5162 CDI embedded integration improvements

Clean up CDI integration and documentation to better support embedded usage.
 + made listener public
 + added utility class for SCIs

* Issue #5162 CDI embedded integration improvements

Clean up CDI integration and documentation to better support embedded usage.
 + moved EmbeddedWeldTest to jetty-embedded

* fix javadoc

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

* Issue #5162 CDI embedded integration improvements

ventilated text

* fix test pom

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

* Fixed javadoc

* Fixed javadoc

* Issue #5162 CDI embedded integration improvements

Moved tests to jetty-cdi to avoid consequences to other tests in embedded

* trailing new line

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

* updates from review

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

* Feedback from review
2020-09-07 14:00:20 +02:00
Joakim Erdfelt 9d839fe6e6
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-02 12:59:04 -05:00
Joakim Erdfelt dcb06d3c35
Issue #5214 - Use known content_length when in HEAD mode
+ Adding DefaultServlet.doHead() to avoid servlet wrapping
+ Making ResourceService HEAD aware

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-31 11:03:49 -05:00
Greg Wilkins 601710c9dc
Issue #5171 Simplify GzipHandler user-agent handling (#5196)
* Issue #5171 Simplify GzipHandler user-agent handling

+ Remove User-Agent handling from GzipHandler
+ Allow Vary header to be set
+ Create rewrite MsieRule to remove Accept-Encoding from IE<=6

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

* + Full implementation of HttpFields ensure
 + use for Vary field

* + fixed checkstyle

* + fixed test for merged header

* + fixed javadoc

* Issue #5171 Simplify GzipHandler user-agent handling

 + improved comments

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

* rename and testing after review
2020-08-26 23:55:36 +02:00
Jan Bartel 77779ed6d8
Issue #4996 - Regularlize logging (#5167)
* Issue #4996 Regularize logging

Signed-off-by: Jan Bartel <janb@webtide.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-24 17:15:13 +02:00
olivier lamy c198d26e6b Updating to version 10.0.0-SNAPSHOT 2020-08-11 16:47:55 +08:00
olivier lamy 429b091578 Updating to version 10.0.0.beta1 2020-08-11 16:47:54 +08:00
Simone Bordet d53d9d8a1d Fixes #5079 - :authority header for IPv6 address not having square brackets.
On the client:
* Origin.Address.host is passed through HostPort.normalizeHost(),
so that if it is IPv6 is bracketed.
Now the ipv6 address passed to an `HttClient` request is bracketed.
* HttpRequest was de-bracketing the host, but now it does not anymore.

On the server:
* Request.getLocalAddr(), getLocalName(), getRemoteAddr(),
getRemoteHost(), getServerName(), when dealing with an IPv6 address,
return it bracketed.
The reason to return bracketed IPv6 also from *Addr() methods is that
if it is used with InetAddress/InetSocketAddress it still works, but
often it is interpreted as a URI host so brackets are necessary.
* DoSFilter was blindly bracketing - now it does not.

Added a number of test cases, and fixed those that expected
non-bracketed IPv6.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-07 15:53:19 +02:00
Simone Bordet c49035570e Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-convert_synchronized_to_autolock'. 2020-08-04 16:32:55 +02:00
Simone Bordet 2fe01626a5 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-31 17:47:37 +02:00
Greg Wilkins 7adbf247ec
Issue #5093 Static UrlEncoded (#5098)
* Issue #5093 Static UrlEncoded

Updated UrlEncoded to static only class with no synchronization

* Fixed additional tests

* fixed formatting

Signed-off-by: gregw <gregw@webtide.com>
2020-07-30 17:57:38 +02:00
Joakim Erdfelt 784fabf2ae
Issue #3916 - Fix whitespace between boundary and part headers
+ Updating existing testcase

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-07-30 09:26:09 -05:00
Simone Bordet 089e51f0bc Fixes #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-29 15:34:01 +02:00
Simone Bordet 8d69fc41a7 Fixes #5083 - Convert synchronized usages to AutoLock.
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 23:14:05 +02:00
Joakim Erdfelt fe9deae849 Updating to version 9.4.32-SNAPSHOT 2020-07-23 13:53:47 -05:00
Joakim Erdfelt 450ba27947 Updating to version 9.4.31.v20200723 2020-07-23 12:46:54 -05:00
Lachlan Roberts 6364490161 restore old ServletPathMapping even for include dispatch types
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 23:41:56 +10:00
Lachlan Roberts cd3f495e9c disable test until merge of #5058 is fixed
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 11:58:55 +10:00
Lachlan Roberts 5726fa9364 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-23 10:19:53 +10:00
Greg Wilkins 65de149f84
Issue #5057 - Included root context path (#5058)
* Fixes #5057 Included root context path

Root context path in include should be empty string.

* Issue #5057

merged context path methods as result of review.
ServletContent.getContextPath now returns the encoded contextPath (if anybody is silly enough to have one).
2020-07-20 17:35:48 +02:00
gregw 965e73e9e9 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-20 12:01:53 +02:00
Joakim Erdfelt 8e7bfa0ee5
Some jetty-servlet test cleanup
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-07-16 14:28:08 -05:00
Jan Bartel 668174d91d Issue #5025 - wrong welcome file handling with dispatcher.include() and non-default mapping (#5026)
Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-07-16 12:26:39 +02:00
Lachlan Roberts c09e4d6f86 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-16 08:46:29 +10:00
Grzegorz Grzybek b08fd185c8
Issue #5025 - wrong welcome file handling with dispatcher.include() and non-default mapping (#5026)
Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>
2020-07-15 14:29:33 +02:00
Jan Bartel 8cc380ed9e Fix ServletHandlerTest.testFiltersServletsListenersAsBeans
In jetty-10, the Container.Listener is also dumped as a bean, whereas it is not in
jetty-9. The test was checking that nothing was dumped as a bean, so
changed the test to explicitly look for the special formatting for
listeners, filters and servlets.
2020-07-15 11:26:58 +02:00
Lachlan Roberts de1b6745c5 the DO NOT EDIT comment in .mod files should start with '#'
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 16:47:22 +10:00
Jan Bartel 3b9def69bc Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-14 14:11:15 +02:00
Jan Bartel b1e08ba4e0
Issue #5020 Make servlets,filters,listeners beans again (#5028)
* Issue #5020 Make servlets,filters,listeners beans again

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-07-14 11:20:20 +02:00
olivier lamy eefe3d202b revert fail release
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-07-10 15:04:22 +10:00
olivier lamy 9619a5a743 Updating to version 10.0.0.beta1 2020-07-10 14:23:28 +10:00
olivier lamy aaeffb719e Updating to version 10.0.0-SNAPSHOT 2020-07-09 12:25:34 +10:00
olivier lamy 23c99ffdbe Updating to version 10.0.0.beta1 2020-07-09 11:20:55 +10:00
Jan Bartel bd15434915 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-06 10:37:32 +02:00
Jan Bartel d785b590b1
Issue #5000 Fix NPE in FilterMapping.appliesTo (#5005)
* Issue #5000 Fix NPE in FilterMapping.appliesTo

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-07-06 10:24:10 +02:00
Joakim Erdfelt e1c8a0e8b8
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-25 12:52:29 -05:00
Joakim Erdfelt 3adec35cf5
Fixing CustomImportOrder checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-25 09:25:05 -05:00
Joakim Erdfelt 6df6fa33b8 Updating to version 9.4.31-SNAPSHOT 2020-06-11 08:24:34 -05:00
Joakim Erdfelt 271836e4c1 Updating to version 9.4.30.v20200611 2020-06-11 07:21:18 -05:00
Greg Wilkins fb6a445639
Issue #4741 No Servlet Path (#4898)
* Issue #4741 HttpServletMapping

This completes the refactoring started in #4851, using
the HttpServletMapping field to avoid having the servletPath field
in the Request and instead have a pathInContext field.

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

* Issue #4741 HttpServletMapping

reverted ResourceService changes

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

* Issue #4741 HttpServletMapping

fixed gzip handler

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

* Issue #4741 HttpServletMapping

Fixed several TODOs left in the code
removed _contextPath field and used an attributes lookup for include
replaced setContextPaths with setContext

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

* Issue #4741 HttpServletMapping

Used the same pattern from the contextPath changes for servletPath and pathInfo.   Now the servletPathMapping is always set on the request and only if the dispatch is an include do the effected methods look deeper for the source values.

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

* Issue #4741 HttpServletMapping

Improved javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-28 12:17:22 +02:00
Joakim Erdfelt 5d6f3e2ddc Updating to version 9.4.30-SNAPSHOT 2020-05-21 13:42:25 -05:00
Joakim Erdfelt 77c232aed8 Updating to version 9.4.29.v20200521 2020-05-21 12:04:14 -05:00
Lachlan 8d5430bc60
Issue #4741 - fix issues with HttpServletMapping (#4851)
* Issue #4741 - fixes to jetty implementation of HttpServletMapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - don't lazily generate HttpServletMapping to preserve servletName

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - tests should expect no leading / for matchValue

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* resolving TODOs from review

- removed pathSpec from Request
- getServletMapping moved to ServletHandler

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - only create HttpServletMapping for exact matches once

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* use wrapped attributes for async dispatch

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - Changes from review, revert async attribute wrapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 - Changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4741 Async ServletMapping

Greatly increased the scope of this PR by combining the servletPath and
pathInfo into the ServletPathMapping class that implements the
HttpServletPathMapping interface.    This allows us to greatly simplify
the matching of servlets and reduce the number of times we need to
actually to the match per request.

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

* Issue #4741 Async ServletMapping

Fixed problems with previous commit
more cleanup of attributes in dispatcher.

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

* Issue #4741 Async ServletMapping

More code cleanups

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

* Issue #4741 Async ServletMapping

Named dispatch cleanup

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

* Issue #4741 Async ServletMapping

misc cleanup

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

* Issue #4741 Async HttpServletMapping

Added tests for named dispatchers
Do not use ServletPathMapping for named dispatch

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

* Issue #4741 Async HttpServletMapping

renamed confusing isDefault method on ServletMapping

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

* Issue #4741 Async HttpServletMapping

simplified setAttribute

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

* Issue #4741 Async HttpServletMapping

added javadoc about AsyncAttributes

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

* Issue #4741 Async HttpServletMapping

Fixed javadoc

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

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2020-05-20 15:23:32 +02:00
Simone Bordet 0018c298dc
Merge pull request #4845 from eclipse/jetty-10.0.x-4808-review_httpclient_header_api
Fixes #4808 - Review HttpClient Request header APIs.
2020-05-08 17:52:51 +02:00
olivier lamy c8c341f9b4 fix license header
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-06 07:40:10 +10:00
Joakim Erdfelt eba5028bcf
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-05 10:03:27 -05:00
Simone Bordet cf9df70935 Fixes #4808 - Review HttpClient Request header APIs.
Introduced:
* Request Request.headers(Consumer<HttpFields.Mutable>).
This allows applications to modify the headers, and chain calls.
It also delegates the precise semantic of put/add/remove/clear to HttpFields, so there is no API duplication.
* HttpRequest.header(HttpField) to efficiently add fields while normalizing the request (only used in implementation).

* HttpResponse.header(HttpField) to efficiently add fields while parsing the response (only used in implementation).
This pairs with HttpResponse.trailer(HttpField).
* HttpResponse.headers(Consumer<HttpFields.Mutable>) to modify the fields after they have been populated (only used in tests).

Removed:
* Request.[set,add,put,remove], replaced by headers(Consumer<HttpFields.Mutable>).

Deprecated:
* Request.header(String, String)
* Request.header(HttpHeader, String)
Both replaced by headers(Consumer<HttpFields.Mutable>) with clearer semantic for add/put/remove.

All the rest is code cleanup to remove the usage of the deprecated header() methods.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 23:16:59 +02:00
Simone Bordet 1c22de433b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 19:11:26 +02:00
Joakim Erdfelt d58da0f7d2
Issue #4824 - Addressing flush/commit with GzipHttpOutputInterceptor
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-04 09:22:08 -05:00
Joakim Erdfelt c645d0f7c4
Issue #4835 - Addressing flush/commit with GzipHttpOutputInterceptor
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-01 14:42:08 -05:00
Greg Wilkins 2addb6a655
Jetty 10.0.x use HandlerList instead of HandlerCollection (#4757)
* Use HandlerList instead of HandlerCollection

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

* Use HandlerList instead of HandlerCollection

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-15 18:42:28 +02:00
Simone Bordet 509f5791ff Issue #4765 - Review GzipHandler inside ServletContextHandler.
Restored IncludedGzipTest.
Fixed ServletContextHandler.relinkHandlers(), now excluding
the checks for GzipHandler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-14 12:39:19 +02:00
Simone Bordet 013acca012 Issue #4765 - Review GzipHandler inside ServletContextHandler.
Fixed XML files.
Restored ServletContextHandler.setGzipHandler() and
deprecated it in case it's used from user's XML files.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-14 12:19:52 +02:00