Commit Graph

5352 Commits

Author SHA1 Message Date
Jan Bartel b36430e5dc Reduce startup session logging
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-09-16 12:09:34 +02:00
Jan Bartel bf39dc186a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-16 11:28:13 +02:00
Jan Bartel bd589de512
Issue #5268 Change WARN to DEBUG for NullSessionCache eviction setter. (#5270)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-09-16 11:27:07 +02:00
Lachlan Roberts fbaabf5c8f update documentation for statistics collection
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-16 15:48:27 +10:00
Greg Wilkins 780e1207c7
Issue #5254 List/Show modules (#5257)
* Issue #5254 List/Show modules

 * simplified --list-modules output
 * added --show-module

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

* improve module descriptions

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-09-14 18:07:16 +02:00
Joakim Erdfelt 59b85b6288
Issue #5247 - Updating Javadoc on ForwardedRequestCustomizer
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-11 11:58:04 -05:00
Joakim Erdfelt a2233ce233
Issue #5247 - Introduce ForwardedRequestCustomizer.Priority enum
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-11 11:17:31 -05:00
Joakim Erdfelt ac42cbd143
Issue #5247 - Improve testing of ForwardedRequestCustomizer
+ Merge ProxyPass tests from CheckReverseProxyHeadersTest into
  ForwardedRequestCustomizerTest
+ Deleted CheckReverseProxyHeadersTest.java
+ Add more tests for ForcedHost configuration
+ Updated ForwardedRequestCustomizer to conform to expectations

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-11 11:11:09 -05:00
Lachlan Roberts f2abf21df6 Move AsciiLowerCaseSet to jetty-util & changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-10 08:02:59 +10:00
Jan Bartel b72343b955
Issue #2609 Add gracePeriod to file session store. (#5243)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-09-09 23:42:53 +02:00
Joakim Erdfelt 4280303046
Issue #5247 - Document ForwardedRequestCustomizer authority search order
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-09 15:20:21 -05:00
Joakim Erdfelt f74cada660
Issue #5247 - Priority based ForwardedRequestCustomizer
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-09 14:56:33 -05:00
Joakim Erdfelt fc0683ac17
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-09 11:40:00 -05:00
Joakim Erdfelt 165e59b3e2
Merge pull request #5226 from eclipse/jetty-9.4.x-5224-xforwarded-multiple-ports
Issue #5224 X-Forwarded-Host support for port
2020-09-09 11:37:33 -05:00
Joakim Erdfelt 4215edd3b9
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-09 09:30:30 -05:00
Lachlan Roberts 2f23c5936e Issue #5198 - revert usage of deflater ByteBuffer API for GzipHandler
The CRC32 checksum may need to convert the ByteBuffer to an array anyway so
we are better off not setting the deflater input with ByteBuffer directly.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-09 14:03:42 +10:00
Lachlan Roberts 4e6827c539 Issue #5198 - fix usage of inflater/deflater ByteBuffer API
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-09 13:53:09 +10:00
Joakim Erdfelt 2896ed31d6
Issue #5224 - Updating ForwardedRequestCustomizerTest expectations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-08 12:34:53 -05:00
Joakim Erdfelt 56b1d17d79
Issue #5233 - correcting NCSARequestLogTest expectation on unsupported version
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-08 05:59:41 -05:00
Lachlan Roberts 7a04b3eb19 Issue #5198 - use ByteBuffer API for inflater/deflaters for GzipHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-08 17:10:36 +10:00
Lachlan Roberts 3bdd82eb5e Issue #5198 - GzipHandler should use InflaterPool as well as DeflaterPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-08 15:27:21 +10:00
Lachlan Roberts 17ec87f51c Issue #1761 - add extra .ini file configuration for gzip.mod
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-08 09:46:51 +10:00
Lachlan Roberts 7642be8fd0 Issue #4988 - make the MIME type comparison in GzipHandler case insensitive
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-07 17:29:13 +10:00
Joakim Erdfelt b2e0f69ea8
Issue #5233 - Bad/Unsupported HTTP version should return 505 not 400.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-04 12:23:11 -05: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 5fef14019a
Merge pull request #5215 from eclipse/jetty-9.4.x-5214-head-huge-static
Issue #5214 - Servlet HEAD doesn't support content-length over Integer.MAX_VALUE
2020-09-02 12:54:38 -05:00
Joakim Erdfelt e2134b13d7
Issue #5224 - X-Forwarded-Host support for port
+ More test cases
+ Allowing X-Forwarded-Host to parse port (if present properly)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-02 10:27:33 -05:00
Joakim Erdfelt e4ca153364
Issue #5224 - Test to replicate reported issue
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-02 09:34:16 -05:00
Jan Bartel 9ab95ed824 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-02 12:09:23 +02:00
Jan Bartel ef0c752476
Issue #4888 Ensure HttpSessionListener can access session via (#5220)
Issue #4888 Ensure HttpSessionListener can call Request.getSession

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-09-02 11:53:23 +02:00
Greg Wilkins a6b7f73019 Merge branch 'jetty-9.4.x-5214-head-huge-static' of https://github.com/eclipse/jetty.project into jetty-9.4.x-5214-head-huge-static 2020-08-31 18:22:10 +02:00
Greg Wilkins 9e326fe520 + improved sentinels values for content-length
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-08-31 18:19:11 +02:00
Joakim Erdfelt 9128fc48e4
Cleanup dead code in ResourceService
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-31 11:16:22 -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
Joakim Erdfelt eba360f662
Issue #5214 - Use known content_length when in bypass write
+ In the case of HEAD, the servlet-api response is a wrapper
  of javax.servlet.http.HttpServlet$NoBodyResponse
  We know the content_length, use it.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-31 09:43:04 -05:00
Jan Bartel ad9d702adb
Issue #2609 - Uniform Find Expired Sessions (#5097)
* Issue #2609 Make all session stores use same algorithm to find expired sessions

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-08-31 12:39:30 +02:00
Lachlan Roberts 40e37730bc Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-28 12:38:58 +10:00
Lachlan 001def4905
Merge pull request #5175 from eclipse/jetty-9.4.x-5105-StatisticsHandler
Issue #5105 - StatisticsHandler Graceful Shutdown of Async Requests
2020-08-28 11:54:45 +10:00
Lachlan Roberts a9c90d3309 Issue #5105 - change asyncGraceful to gracefulShutdownWaitsForRequests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-27 08:59:13 +10: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
Joakim Erdfelt ccc863726b
Issue #5133 - Updates based on review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-26 12:19:22 -05:00
Lachlan Roberts 2282d16c98 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-25 14:32:16 +10:00
Lachlan Roberts 8edb7682cd DebugHandler should use isAsyncStarted() instead of isSuspended()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-25 10:40:09 +10:00
Lachlan Roberts 2d5da1fa35 StatisticsHandler should still return 503 responses on shutdown
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-25 10:34:59 +10:00
Lachlan Roberts 8faa71818f change addToAllConnectors method to addBeanToAllConnectors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-25 10:22:18 +10: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
Lachlan Roberts c0268c590f change name of waitForSuspendedRequestsOnShutdown to asyncGraceful
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-24 16:19:59 +10:00
Lachlan Roberts 623d1be7c7 Change the way ConnectorStatistics is added to the Servers Connectors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-21 15:45:58 +10:00
Lachlan Roberts ef2f1dfd0d Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-21 10:37:24 +10:00
Lachlan Roberts 70a679f5f4 reorder some CustomRequestLog methods to be same as jetty-10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-21 10:29:22 +10:00
Lachlan Roberts 12381e9cf5 cleanup various warnings and TODOs in CustomRequestLog
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 12:02:00 +10:00
Lachlan Roberts 0fae221afa Issue #5105 - fix GracefulStopTest expectations from 503s to 404s
StatisticsHandler no longer gives 503 responses after shutdown.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 07:27:12 +10:00
Lachlan Roberts a65f00156d Issue #5105 - add optional configuration to not wait for suspended requests in StatisticsHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 07:27:12 +10:00
Lachlan Roberts 32358b1b77 Issue #5105 - fix StatisticsHandler bug with async dispatched requests
If the request is async dispatched, the check state.isSuspended() is not
correct to determine if the request was async or not. The check
state.isAsyncStarted() should be used instead.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-20 07:27:12 +10:00
Thomas Draebing a46ed5b5f0 Also manage graceful shutdown of already started async requests
Signed-off-by: Thomas Draebing <thomas.draebing@sap.com>
2020-08-19 09:59:21 +02:00
Simone Bordet 7b3dccc1bf Issue #5104 - AbstractProxyServlet include incorrect protocol version in Via header when accessed over H2.
Added HttpFields.computeField() for HttpHeader too and updated usages.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 11:50:43 +02:00
Simone Bordet 79d340fdb6 Fixes #5104 - AbstractProxyServlet include incorrect protocol version in Via header when accessed over H2.
* Introduced HttpFields.computeField() to put/append header values.
* Reworked AbstractProxyServlet.addViaHeader().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 00:08:52 +02:00
Joakim Erdfelt 6848403d34
Issue #5133 - Reworking WebAppContext.extraClasspath
+ Reverting name ResourceFactory.newResource(String)
  to .getResource(String)
+ Reintroducing Resource.getResource(String)
+ ResourceHandler.getResource(String) cleaned up
  in light of Exception handling requirement
+ Resource.addPath(String) implementations can
  never return null now

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 13:06:09 -05:00
Joakim Erdfelt 0b0d7d3282
Issue #5133 - Reworking WebAppContext.extraClasspath
+ Now parsed by WebAppContext into List<Resource>
+ Reintroduced Resource.fromList
+ Refactored ResourceFactory to never return null
  and always throw an exception if unable to
  get/create/resolve the Resource

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-12 12:50:02 -05:00
Simone Bordet 16cd552995 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-11 21:00:43 +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
Jan Bartel e117fbe828
Issue #1337 Use either absolute or relative multipart file location (#5119)
* Issue #1337 Use either absolute or relative multipart file location

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-08-10 10:31:16 +02:00
Simone Bordet dd4c1dbac0 Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-5079-ipv6_brackets'. 2020-08-08 23:21:14 +02:00
Joakim Erdfelt dcf867cd2b
Issue #3916 - Improve multi range response Content-Length calc
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-08 11:34:25 -05:00
Joakim Erdfelt 2206b3edae
Issue #3916 - Fixing broken Content-Length evaluation
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-08 07:18:02 -05: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
Jan Bartel 437e2be411 Fix license header. 2020-08-05 16:25:01 +02:00
Jan Bartel 8dd205d18f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-08-05 15:43:08 +02:00
Jan Bartel 4f57810217
Issue #5081 - HouseKeeper synchronization (#5099)
* Issue #5081 HouseKeeper synchronization

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-08-05 15:33:27 +02:00
Simone Bordet 062878f97b Issue #5083 - Convert synchronized usages to AutoLock.
Fixes after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-04 17:59:13 +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 d2df0fc2e9 Fixes after review of #4975.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-31 17:59: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 66ec16006e
Issue #5088 Review ContextHandler locking (#5094)
* Issue #5088 Review ContextHandler locking

The locking was primarily as a memory guard for the availability status, which was already volatile.
Have instead using an AtomicReference with a simple state machine layered on top of start/stop lifecycle.
There was also protection for AttributesMap, which is no longer needed as AttributesMap is now concurrent.

* Issue #5088

updates from review

* Issue #5088

updates from review (better this time)
2020-07-30 17:58:34 +02: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 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
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 f0f153cc97 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-16 09:10:07 +10:00
Lachlan bbb0f6617c
Merge pull request #5042 from eclipse/jetty-9.4.x-5019-SslReload
Issue #5019 - hot-reload SSL certificates if keystore file changed
2020-07-16 09:09:03 +10:00
Lachlan cadaf87583
Merge pull request #5046 from eclipse/jetty-10.0.x-4985-AttributeNameSet
Issue #4985 - fix NPE related to use of Attributes.Wrapper getAttributeNameSet() Jetty 10
2020-07-16 08:51:56 +10: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
Lachlan 42ea202858
Merge pull request #5047 from eclipse/jetty-9.4.x-moduleCommentDoNotEdit
the "DO NOT EDIT" comment in .mod files should start with '#'
2020-07-16 08:43:00 +10:00
gregw 7c44d0a01a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-15 23:38:04 +02:00
Greg Wilkins 5c1dda3f7c
Issue #5029 Relative Redirection (#5038)
* Issue #5029 Relative Redirection

Provide option to allow relative redirection

* Issue #5029 Relative Redirection

Fixed checkstyle

* rename from review
2020-07-15 23:14:26 +02: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
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
Lachlan Roberts 037097211c fix cast for HttpServletMapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 16:03:12 +10:00
Lachlan Roberts 2541f1f648 add javadoc for KeyStoreScanner class
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 11:20:57 +10:00
Lachlan Roberts a83844df32 changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-14 16:10:07 +10:00
Lachlan Roberts 62ee077b79 move code of ssl-reload module to jetty-util, move module files to jetty-server
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-13 23:11:09 +10:00
Lachlan Roberts e92d35bd2c fix checkstyle error from extra newline
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-13 15:56:46 +10:00
Lachlan Roberts 6325d4b55c Issue #4985 - fix NPE related to use of Attributes.Wrapper getAttributeNameSet()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-13 14:17:37 +10: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 7ca67f9948 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-07 14:13:11 +02:00
Lachlan effcccd27a
Merge pull request #4980 from eclipse/jetty-9.4.x-threadPoolDocumentation
fix documentation on where to configure ThreadPool
2020-07-07 18:18:48 +10:00
Simone Bordet ba6a6ea67d Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-06 23:10:19 +02:00
Simone Bordet f2c6b67827
Fixes #4971 - Simplify Connection.upgradeFrom()/upgradeTo(). (#5008)
Fixes #4971 - Simplify Connection.upgradeFrom()/upgradeTo().

Now the upgrade-from connection produces a "floating" buffer 
(not belonging to a pool), so that it can release the original buffer.

The upgrade-to connection is free to copy or store this "floating" buffer.

Strengthened ByteBufferPool behavior when releasing non-pooled
ByteBuffers: the buffer is now discarded.

Updated javadocs and all implementations.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-06 22:45:03 +02:00
Lachlan Roberts 085a6112c5 Issue #4985 - revert changes from 9.4 merge to Include, Forward and Async Attributes
The proper ServletPathMapping is not set on the baseRequest when these are constructed
so we can't save fields from this in the constructor. The ServletPathMapping is
later set in the ServletHandler.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-06 16:11:56 +10:00
Lachlan Roberts 345440139b Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-06 12:18:58 +10:00
Lachlan 9a56301de1
Merge pull request #5004 from eclipse/jetty-9.4.x-4985-AttributeNameSet
Issue #4985 - fix NPE related to use of Attributes.Wrapper getAttributeNameSet()
2020-07-06 11:34:27 +10:00
Simone Bordet 7d8e56bd10 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-03 16:46:23 +02:00
Simone Bordet ae43b70a9f
Jetty 9.4.x 4967 buffer corruption for http2 failures (#5001)
Fixes #4967 - Possible buffer corruption in HTTP/2 session failures

Partially reverted the changes introduced in #4855, because they
were working only when sends were synchronous.

Introduced ByteBufferPool.remove(ByteBuffer) to fix the issue.
Now when a concurrent failure happens while frames are being
generated or sent, the buffer is discarded instead of being
recycled, therefore resolving the buffer corruption.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-03 16:35:33 +02:00
Lachlan Roberts f35d6cfd80 Issue #4985 - remove TODO in Dispatcher
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-02 16:02:24 +10:00
Lachlan Roberts 9126b282b1 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-4985-AttributeNameSet 2020-06-30 11:22:41 +10: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
Lachlan Roberts 693312a577 Issue #4985 - ensure every attribute in getAttributeNameSet has a non null value
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-06-25 23:15:12 +10:00
Lachlan Roberts 5ce5737395 fix information on ThreadPool configuration
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-06-18 17:45:32 +10:00
Joakim Erdfelt 6795f3915f
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-12 12:04:50 -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
Jan Bartel cb09abe873
Issue #4920 Restore ability to invalidate sessions on shutdown (#4933)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-06-10 18:40:19 +02:00
Simone Bordet dd6cd4b881 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-09 16:11:53 +02:00
Simone Bordet 56bda1b3ae
Jetty 9.4.x 4855 h2spec failures (#4946)
* Fixes #4855 - Occasional h2spec failures on CI

In case of bad usage of the HTTP/2 API, we don't want to close()
the stream but just fail the callback, because the stream
may be performing actions triggered by a legit API usage.

In case of a call to `AsyncListener.onError()`, applications may decide to call
AsyncContext.complete() and that would be a correct usage of the Servlet API.
This case was not well handled and was wrongly producing a WARN log with an
`IllegalStateException`.

Completely rewritten `HttpTransportOverHTTP2.TransportCallback`.
The rewrite handles correctly asynchronous failures that now are executed
sequentially (and not concurrently) with writes.
If a write is in progress, the failure will just change the state and at the
end of the write a check on the state will determine what actions to take.

A session failure is now handled in HTTP2Session by first failing all the
streams - which notifies the Stream.Listeners - and then failing the session
- which notifies the Session.Listener.
The stream failures are executed concurrently by dispatching each one to a
different thread; this means that the stream failure callbacks are executed
concurrently (likely sending RST_STREAM frames).
The session failure callback is completed only when all the stream failure
callbacks have completed, to ensure that a GOAWAY frame is processed after
all the RST_STREAM frames.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-09 13:15:05 +02:00
olivier lamy 2413f551f1 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-06-07 09:30:54 +10:00
Simone Bordet 029470c5dc Fixes #4939 - acceptorQueueSize [sic]
acceptorQueueSize -> acceptQueueSize.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-04 18:31:40 +02:00
Lachlan Roberts 86ea115e1f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-04 09:27:43 +10:00
Lachlan Roberts 38f56f5973 make some test methods public to fix build
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-06-04 09:26:35 +10:00
Joakim Erdfelt 426795660f
Cleaning up double-merge final issues.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-03 16:14:32 -05:00
Joakim Erdfelt 90c1fc668c
Merge branch 'jetty-10.0.x' of github.com:eclipse/jetty.project into jetty-10.0.x 2020-06-03 16:10:51 -05:00
Joakim Erdfelt 0cce039e7c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-03 16:10:41 -05:00
Greg Wilkins 0f48708922 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-06-03 23:01:52 +02:00
Greg Wilkins ff8ae56fa9
Issue #4936 response buffer corruption (#4937)
* Issue #4936 - Adding LargeHeaderTest to replicate issue

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4936 - Updating LargeHeaderTest to use ServerConnector

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4936 - Fail LargeHeaderTest if client detects issues.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4936 large response header buffer corruption

If the response buffer is too large, the header buffer was released
but not nulled, then an exception thrown, which again released the
not nulled buffer.  The buffer thus ends up in the buffer pool twice!

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

* Issue #4936 large response header buffer corruption

removed old comment

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

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-03 22:54:12 +02:00
Joakim Erdfelt 41440b6c2c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-01 09:40:43 -05:00
Jan Bartel 42155e889b Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-06-01 14:47:07 +02:00
Joakim Erdfelt f9b75ff1a3
Issue #4923 - Applying changes requested in PR
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-01 07:15:07 -05:00
Joakim Erdfelt b6d24c2396
Issue #4923 - Applying changes requested in PR
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-06-01 07:13:28 -05:00
Joakim Erdfelt 6a953e3a0e
Issue #4923 - Applying changes requested in PR
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-29 16:30:08 -05:00
Joakim Erdfelt c1c2c07a51
Issue #4923 - restore caching of SSLSession information for SSL Attributes
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-29 13:30:59 -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
Jan Bartel 46f8705b8c Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-28 11:14:11 +02:00
Jan Bartel 84cb97e6bd
Issue #4885 do not allow cookies to be set from an include (#4915)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-05-28 10:51:40 +02:00
Jan Bartel 6f2de51ba1 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-27 13:51:37 +02:00
Jan Bartel aae64f181c
Issue #4894 use schema and/or catalog name when creating sessions table (#4908)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-05-27 13:42:01 +02:00
Greg Wilkins b8c7a9509a Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-27 10:11:51 +02:00
Greg Wilkins e82cacfdb6
Jetty 9.4.x single context optimisation (#4909)
* Optimisation for single context

It is a frequent deployment mode to have only a single context.
In that case, the ContextHandlerCollection can bypass a bit of
looping/matching/selecting and just call the single context,
which it works out itself anyway if the request applies to it.

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

* Optimisation for single context

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-27 09:53:13 +02:00
olivier lamy 1249763aad remove changes to DatabaseAdaptor with new fields username/password, use our own username/password in maria_db tests
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +10:00
olivier lamy c05bd6c26d use testcontainers/docker to run jdbc sessions tests with Mariadb remote
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-27 16:00:23 +10: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
Jan Bartel 42e46aee49 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-20 23:06:27 +02:00
Jan Bartel 52e7dd4873
Issue #4895 SessionCache flushOnResponseCommit with invalid session (#4896)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-05-20 23:05:53 +02: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
Lachlan Roberts ccaca1892e Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-14 13:37:13 +10:00
Lachlan Roberts 7111f5f161 Issue #4861 - AsyncAttributes should wrap ServletAttributes inner AttributesMap
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-14 08:33:31 +10:00
Lachlan Roberts 4aece5e9cf Issue #4861 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-13 23:12:22 +10:00
Lachlan Roberts 629e106045 Issue #4861 - increase efficiency of ServletAttributes when going async
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-13 19:10:11 +10:00
Lachlan Roberts 9f39fd1dd1 Issue #4861 - reduce garbage created by the async request attributes
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-05-12 18:28:23 +10:00
Joakim Erdfelt 822d98b023
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-05-11 21:16:59 -05:00
Joakim Erdfelt 86a40a07d6
Merge pull request #4863 from eclipse/jetty-9.4.x-4860-NullHttpFields
Issue #4860 - NPE from HttpFields
2020-05-11 21:04:50 -05:00
Greg Wilkins 3b33ed2af2 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-05-11 21:48:31 +02:00
Greg Wilkins e86977394e
Issue #4828 Buffer Corruption (#4864)
+ improve synchronization around releaseBuffer
 + improve synchronization around acquireBuffer
 + made acquireBuffer private.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-11 21:48:06 +02:00
Greg Wilkins c07409dc62 Merge branch 'jetty-10.0.x' of github.com:eclipse/jetty.project into jetty-10.0.x 2020-05-11 21:47:56 +02:00
Greg Wilkins c497b61917 Issue #4860 NPE from HttpFields
Paranoid catch if sending and exception page throws an exception.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-11 13:57:17 +02:00
Simone Bordet 63bfb43b2f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-08 15:23:00 +02:00
Ludovic Orban 409db8d065 introduce socket configuration properties in Jetty XML files
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-08 13:14:50 +02:00
olivier lamy 43cc48d003 fix jpms configuration for test
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-05-08 12:56:21 +10:00
olivier lamy 972cd95ec0 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-05-08 10:21:41 +10:00
Ludovic Orban 072cc978fb
add HttpConfiguration.Customizer implementation that sets request attributes containing the real local and remote address:port pairs (#4849)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-07 19:53:15 +02:00
Joakim Erdfelt c50a52a392
Merge pull request #4844 from lorban/jetty-9.4.x-4843-proxyv2-ignored-address-length
proxy v2 skip address length bytes when LOCAL command is specified
2020-05-07 10:16:57 -05:00
Greg Wilkins ed37a1e2fc Minor cleanup
Use existing method (which may cache value) rather than inlined code.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-05-06 11:18:44 +02: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
Joakim Erdfelt e4fd49dc36
Merge pull request #4838 from eclipse/jetty-9.4.x-4835-gziphandler-flush
Issue #4835 - Addressing flush/commit with GzipHttpOutputInterceptor
2020-05-05 09:54:41 -05:00
Ludovic Orban d34cb2598b proxy v2 skip address length bytes when LOCAL command is specified
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-05 13:51:30 +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
Simone Bordet 99ecfca439 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-04 13:00:15 +02:00
Simone Bordet 2fa161c515
Merge pull request #4790 from eclipse/jetty-9.4.x-4778-sni_with_one_certificate
Fixes #4778 - Enforcing SNI when there are only non-wildcards certifi…
2020-05-04 11:35:04 +02: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
Jan Bartel f154151016
Jetty 10.0.x 4825 pushbuilder (#4829)
* Issue #4825 Implement spec requirements for Request.newPushBuilder

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-05-01 11:07:06 +02:00
Greg Wilkins 81c46638cd
Jetty 10.0.x 4814 configuring connection factory (#4815)
* Issue #4814 Configuring Connection Factory

Redo of this PR without Attributes improvements (moved to #4816).
Add a ConnectionFactory.Configuring interface to all connectors to be configured during doStart.
I have some concern about shared HttpConfigurations.

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

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-29 11:45:08 +02:00
Greg Wilkins 8c7e34f37d
Jetty 10.0.x immutable meta data (#4777)
Made HttpURI, HttpFields and MetaData immutable.  The first two follow the same builder pattern and MetaData is constructor injection only.

* Immutable version of HttpFields

Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.

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

* Immutable version of HttpFields

Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable

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

* Immutable version of HttpFields

Fixed exception type.

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

* Immutable version of HttpFields

asImmutable method

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

* Immutable MetaData

Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.

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

* Immutable MetaData

Fixes from review

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

* Immutable MetaData

Passing tests upto and including jetty-server

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

* Immutable MetaData

Cleanup of HttpURI.Builder API as suggested in PR.

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

* Immutable MetaData

Added builder for MetaData.Request

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

* Immutable MetaData

more api fixes

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

* Immutable MetaData

WIP making HttpFiels itself immutable.  Currently working up to jetty-servlet.

Need to consider if content-length really is meta data and how much and when can we trust it.

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

* Immutable MetaData

WIP

Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.

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

* Immutable MetaData WIP

jetty-client and jetty-servlet passing tests.

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

* Immutable MetaData WIP

Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`

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

* Immutable MetaData WIP

http2-server tests passed

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

* Immutable MetaData WIP

http2-client tests passed

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

* Immutable MetaData WIP

cleann build?

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

* Immutable MetaData WIP

fix

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

* Immutable MetaData WIP

more test fixes

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

* Immutable MetaData WIP

Cleanups, mostly using EMPTY when appropriate.

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

* Immutable MetaData WIP

Cleanups, use immutable

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

* Immutable MetaData WIP

No trailers for connect

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

* Immutable MetaData WIP

Fix CONNECT path handling

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

* Immutable MetaData WIP

fixed rewrite query handling

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

* Immutable MetaData WIP

rename Builders to Muttables

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

* Immutable MetaData WIP

misc cleanups

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

* Immutable MetaData WIP

Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!

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

* Immutable MetaData WIP

More optimizations and better test coverage.

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

* Immutable Metadata

various cleanups

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

* Immutable MetaData WIP

More optimizations

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

* Immutable MetaData WIP

review changes

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + more usage of EMPTY
 + restored fragment handling

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + less usage of asImmutable

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

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable

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

* Immutable MetaData

changes after review:
 + better handling of URI in ContextHandler

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

* Immutable MetaData

changes after review:
 + downcast in test to access mutable response headers.

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

* Immutable MetaData

changes after review:
 + use put instead of add for one time headers

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

* private

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:36:44 +02:00
Greg Wilkins ef4d1fac04 fixed bad merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 10:52:02 +02:00
Greg Wilkins eacb79f4e7 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 10:29:41 +02:00
Greg Wilkins 8fcbf6d590
Improve Attributes Handling (#4816)
* Spun out from #4814 Improve Attributes Handling

Improve attribute handling to reduce garbage and improve lookup.
Introduced a Wrapper so that request can remove any layers on reset.

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

* Issue #4814 - Exposing AttributeMap.getAttributeNameSet() on Attributes.

The underlying AttributesMap already has a .getAttributeNameSet()
method, expose it on the Attributes interface.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Allow a set to override a secure attribute.

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

* Issue #4814 - Attributes.getAttributeNames() is now defaulted

The Attributes.getAttributeNames() will use the
.getAttributeNameSet() by default now.

Updated all Attributes.Wrapper impls to use this new behavior

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-04-28 10:16:29 +02:00
Jan Bartel 8153efc2e6
Issue #4794 Test for asyncIsStarted for setReadListener (#4804)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-24 10:01:04 +02:00
Jan Bartel 74b6694075
Jetty 10.0.x 4794 http input set read listener (#4796)
* Issue #4794 HttpInput.setReadListener should check async state

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-21 15:24:40 +02:00
Simone Bordet 426c80bf6d Fixes #4778 - Enforcing SNI when there are only non-wildcards certificates.
If SNI is required, wrap the KeyManagers with SniX509ExtendedKeyManager.
Updated the main keystore file to only have one certificate (instead of two),
since there never was the need for two certificates in the tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-18 18:15:03 +02: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
Jan Bartel 474fa8b8e9
Issue #4762 Request.authenticate must return true if already authenticated (#4763)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-14 12:49:22 +02:00
Simone Bordet 93774ae564 Fixed #4766 - SecuredRedirectHandler should extend HandlerWrapper.
Updated the implementation to extend from HandlerWrapper.
Updated the documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-13 14:36:33 +02:00
Simone Bordet 35dce5f315 Improvements to the Jetty server documentation.
Written connector and handler sections.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-10 15:40:15 +02:00
Joakim Erdfelt 5699b9ff3d Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
Joakim Erdfelt ab228fde9e Updating to version 9.4.28.v20200408 2020-04-08 12:33:56 -05:00
Jan Bartel bfc9738f86
Issue #4760 Response.setLocale should override previous (#4761)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-08 17:28:14 +02:00
Jan Bartel efe2dc1e90
Issue #4752 Call HttpSessionListener.sessionCreated in add order. (#4753)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-08 11:16:20 +02:00
Simone Bordet e1be62c978 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-04-07 14:54:09 +02:00
Simone Bordet 4e3c0c8cd7 Fixes #4751 - Refresh NetworkTraffic* classes.
Introduced NetworkTrafficSocketChannelEndPoint to replace
NetworkTrafficSelectChannelEndPoint, now deprecated.

Code and javadocs cleanup.

Moved the tests to jetty-client so that also the client is tested.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-07 12:04:24 +02:00
Jan Bartel 9726bb88ff Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-04-06 10:58:44 +02:00
Jan Bartel cf0e3c530f
Issue #4662 Ensure contextDestroyed called after filters and servlets destroyed (#4667)
* Issue #4662 Ensure contextDestroyed called after filters and servlets destroyed

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-04-06 10:12:19 +02:00
Joakim Erdfelt 9b57fcd8ee
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-documentation/src/main/asciidoc/configuring/security/configuring-form-size.adoc
2020-04-02 07:13:32 -05:00
Joakim Erdfelt 1cbb8d0232
Merge pull request #4740 from eclipse/jetty-9.4.x-4638-formcontentsize-doc
Issue #4638 - updating documentation about form limits
2020-04-02 07:03:54 -05:00
Joakim Erdfelt bdaf86d38d
Issue #4638 - updating documentation about form limits
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-04-01 12:44:44 -05:00
Greg Wilkins af895966fa Issue #4711 trailers
Standard trailers cannot be set if committed or HTTP/1.0

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-01 17:55:33 +02:00
Joakim Erdfelt 929ce34640
Issue #4529 - Fixing HTML error page from showing servlet info if configured not to do so
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-31 14:58:17 -05:00
Simone Bordet 414a1dd396 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-03-31 14:50:48 +02:00
Greg Wilkins ef9e155118
Issue #2074 no merge query string (#4730)
* Issue #4713 Async dispatch with query.

+ Preserve the entire URI with query when startAsync(req,res) is used.
+ merge any query string from dispatch path with either original query or preserved query from forward

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

* Issue #4713 asyncDispatch with query parameters

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

* Issue #2074 Do not merge query strings

Do not merge the query string itself, only the parameter map.
The query string is either the original or replaced by the one from the dispatch.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-31 14:26:25 +02:00
Jan Bartel 524e690140
Issue #4682 Session with no attributes unreadable from jdbc (#4688)
Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-31 14:25:52 +02:00
Jan Bartel 3f7d04ff96
Issue #4719 Keep previous charencoding if not set in content type (#4720)
* Issue #4719 Keep previous charencoding if not set in content type

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

* Issue #4719 - Adding unit tests for charset reset/change

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-31 14:24:55 +02:00
Greg Wilkins e3d670d61d
Issue #4713 Async dispatch with query. (#4721)
* Issue #4713 Async dispatch with query.

+ Preserve the entire URI with query when startAsync(req,res) is used.
+ merge any query string from dispatch path with either original query or preserved query from forward

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

* Issue #4713 asyncDispatch with query parameters

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-30 16:23:26 +02:00
Simone Bordet 6ed952a9c0 Merges 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-30 12:49:39 +02:00
Lachlan d595c59622
Merge pull request #4702 from eclipse/jetty-10.0.x-4603-WS_HTTP2_NPE
Issue #4603 - avoid NPE during websocket HTTP/2 upgrade
2020-03-27 09:44:24 +11:00
Simone Bordet 528d608860 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-03-25 15:22:07 +01:00
Greg Wilkins f4da9760fd Reset trailers on recycled response
Whilst investigating #4711 for jetty-10, it was noticed that trailers are not nulled on recycled Response instances, nor on reset.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-25 13:47:34 +01:00
Lachlan Roberts 85ea14e33d Issue #4603 - clarifications in comments and improve test
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-25 22:43:43 +11:00
Jan Bartel 0c20622648
Issue #4700 ServletContext.createXXX methods should throw UnsupportedOperationException (#4701)
* Issue #4700 ServletContext.createXXX methods should throw UnsupportedOperationException

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-25 11:17:05 +01:00
Lachlan Roberts 035c6d2639 Issue #4603 - avoid NPE during websocket HTTP/2 upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-24 14:46:06 +11:00
olivier lamy b7a4fb7f7e Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-03-24 11:59:35 +10:00
Simone Bordet e215d071c8 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-23 16:24:04 +01:00
Greg Wilkins d45fd14ef8 Revert rename of Response closeOutput to completeOutput #4693
Revert the rename of this method and add a deprecated completeOutput to assist those that used the temporary rename.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-03-23 11:16:04 +01:00
Joakim Erdfelt 7e0fff9a89
Merge pull request #4686 from eclipse/jetty-10.0.x-4685-slf4j-impl-not-included
Issue #4685 - jetty-slf4j-impl not a compile/runtime dependency.
2020-03-20 12:04:32 -05:00
Joakim Erdfelt 43419802b7
Issue #4685 - Declare <scope> for jetty-slf4j-impl everywhere
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 11:12:08 -05:00
Joakim Erdfelt 2c600f2b68
Issue #4685 - Mark jetty-slf4j-impl as test scope by default
+ Update logging in test-hazelcast-sessions
+ Update logging in test-infinispan-sessions

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-20 09:55:15 -05:00
Joakim Erdfelt a16abe1693
Issue #4685 - jetty-slf4j-impl not a compile/runtime dependency.
+ Mark as a test dependency

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-19 17:46:41 -05:00
Simone Bordet 9cbd9ab44e Merged 'jetty-10.0.x' into 'jetty-10.0.x-4382-h1_to_h2_upgrade'. 2020-03-19 18:17:57 +01:00
Simone Bordet b22c0b196f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-03-18 17:00:01 +01:00
Simone Bordet 2940eb8ab5 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4382-h1_to_h2_upgrade'. 2020-03-18 11:44:06 +01:00
Simone Bordet f8d9f82eff Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-18 11:40:11 +01:00
Jan Bartel 1358e5d881 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-03-17 12:20:29 +01:00
Simone Bordet 9bb92f81bd Issue #4443 - Track backport of ALPN APIs to Java 8.
Modified jetty-alpn-openjdk8-* classes to support both
pre 8u252 (via alpn-boot) and post 8u252 (via standard API).

Replaced usages of -Xbootclasspath with -javaagent, and
using Jetty ALPN Agent jar rather than Jetty ALPN boot jar.

Removed all alpn-1.8.0*.mod files since now it is
possible to use a fixed version of the ALPN Agent
to cover all the versions.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-17 11:40:29 +01:00
Lachlan 32c9981529
Merge pull request #4674 from eclipse/jetty-9.4.x-4671-CustomRequestLog-CookieNPE
Issue #4671 - fix NPE from CustomRequestLog logRequestCookie
2020-03-17 11:01:50 +11:00
Joakim Erdfelt 57604d0955
Issue #4572 - Mechanical Change to use org.slf4j
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 15:48:25 -05:00
Joakim Erdfelt 8b7e64915f
Issue #4572 - Replace Jetty Logging with SLF4J
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
       org.eclipse.jetty.util.log.Logger but as
  simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
  to org.eclipse.jetty.logging.StacklessLogging found in
  the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
  + and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
  + Also adding note to jetty-util classes that are used by
    jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 11:21:54 -05:00
Greg Wilkins ca74fbeb32 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-03-16 10:23:58 +01:00
Lachlan Roberts 288caa99f7 Issue #4671 - fix NPE from CustomRequestLog logRequestCookie
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-16 11:17:09 +11:00
Lachlan b497827df0
Merge pull request #4648 from eclipse/jetty-9.4.x-4645-forwardedPortException
Issue #4645 - better error message for empty X-Forwarded-Port value
2020-03-16 10:35:08 +11:00
Simone Bordet 466517a0e8 Issue #4382 - Support HTTP/1 upgrade to HTTP/2 in HttpClient.
* Moved implementation of UpgradeTo from HTTP2ServerConnection
  to HTTP2Connection, since now also the client connection
  can be upgraded to.
* Split HTTP2Session.newStream(), since now the client must
  be able to create the implicit stream 1 corresponding to
  the HTTP/1.1 upgrade request, so that the HTTP/2 response
  after the upgrade finds the stream.
* The HTTP/1.1 upgrade mechanism has been generalized.
  Before it was based on HttpConnectionUpgrader and a hook
  in HttpChannelOverHTTP.exchangeTerminating().
  Now it is based on UpgradeProtocolHandler that when sees
  a 101 response it will trigger the upgrade mechanism.
* Introduced ConnectionPool.accept(Connection) to transfer
  a connection from the HTTP/1.1 connection pool to the
  HTTP/2 connection pool after the upgrade.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-13 15:59:13 +01:00
Lachlan Roberts fcbe704b24 Issue #4645 - do not wrap exceptions from onError with RuntimeException
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-13 13:59:43 +11:00
Lachlan Roberts 633298b5c7 Issue #4645 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-11 22:41:31 +11:00
Lachlan Roberts d5ee7b058b Issue #4645 - handle exceptions from all headers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-11 18:41:41 +11:00
Lachlan Roberts dbd89ce1c7 Issue #4645 - validate port range & return 400 on bad forwarded headers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-11 18:31:25 +11:00
Greg Wilkins 28d6009ac5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-03-10 15:14:56 +01:00
Joakim Erdfelt 965483e4d9
Issue #4631 - Warning about skipping of <Arg> nodes is in wrong place for <Configure> (#4632)
* Issue #4631 - Fixing XML comment that was accidentally reformatted

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4631 - Warning about skipping of <Arg> nodes is in wrong place for <Configure>

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4631 - Improving testcase

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4631 - Removing test classes

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4631 - Cleaning up configure with index per PR review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4631 - More named arg test cases

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Issue #4631 - Add testConfiguredWithNamedArgNotFirst

+ new testcase where <Arg> is needed, but is not the first node

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* Cleanup configuration index usage

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

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2020-03-10 15:11:22 +01:00
Jan Bartel dfa0e0adf7
Jetty 10.0.x 4507 forwardincludemappings (#4590)
* Issue #4507 Implement forward/include/async params for HttpServletMapping

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-03-10 11:05:52 +01:00
Lachlan Roberts 797d25505b Issue #4645 - better error message for empty X-Forwarded-Port value
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-09 13:01:52 +11:00
Lachlan Roberts 2897377370 Issue #4577 - request getPathInfo() could be null in InetAccessHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-02 14:32:52 +11:00
Lachlan Roberts 95ecb4a3e8 Issue #4598 - Changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-29 16:14:20 +11:00
Simone Bordet 1393c0e92b Issue #4400 - Review HttpClient's ContentProvider.
Introduced Request.Content with a reactive model to provide
request content.
Introduced RequestContentAdapter to wrap ContentProviders
into Request.Content.
Updated implementation to use the reactive model rather than
the old pull model.
Reimplemented all ContentProviders in terms of Request.Content.
Converted most of the tests from ContentProvider to Request.Content.
Updated proxy servlets and documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-28 14:40:48 +01:00
Joakim Erdfelt 8aabb52557 Updating to version 9.4.28-SNAPSHOT 2020-02-27 13:03:44 -06:00
Joakim Erdfelt a304fd9f35 Updating to version 9.4.27.v20200227 2020-02-27 12:21:57 -06:00
Lachlan Roberts ccd6c845e5 Merge remote-tracking branch 'origin/jetty-9.4.x-4598-InetAccessHandler' into jetty-10.0.x-4598-InetAccessHandler 2020-02-27 19:34:16 +11:00
Lachlan Roberts 2edc4920fd Issue #4598 - fix InetAccessHandlerTest expectations to fit new behavior
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-27 18:29:29 +11:00
Lachlan Roberts 3c551e960c Issue #4598 - rework InetAccessHandler to use only one IncludeExcludeSet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-27 15:41:35 +11:00
Joakim Erdfelt 99a541f051
Fixing checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-26 13:16:32 -06:00
Jan Bartel 2faec44dfb Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-02-26 16:40:35 +01:00
Hirotaka Ikoma 65a22e5e80
Fix NPE in HouseKeeper.stopScavenging (#4604)
* Fix NPE in HouseKeeper.stopScavenging

Signed-off-by: Hirotaka Ikoma <hikoma@gmail.com>
2020-02-26 16:38:50 +01:00
Greg Wilkins 277ce5f3a5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-02-26 14:36:22 +01:00
Greg Wilkins 9bb6840658
Fixes #4577 IPAccessHandler in context (#4580)
* Fixes #4577 IPAccessHandler in context

Fixes and tests #4577 IPAccessHandler in context by using target instead of pathInfo for path matching.

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

* Tests #4577 IPAccessHandler target

Updates from review.

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

* Issue #4577 IpAccessHandler NPE

Match on full URI path rather than target.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-25 08:46:02 +01:00
Lachlan Roberts bb7e48043d Issue #4598 - Add URI mapping to InetAccessHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-25 14:58:48 +11:00
Greg Wilkins 03359ec089
Tests #4594 ContextListener removed (#4595)
Remove ContextListeners from the destroy list when removed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-22 10:43:36 +01:00
Simone Bordet b0975aaba0 Fixes #4540 - ProxyConnectionFactory should not ignore TLVs.
Generified the API to expose TLVs, so that they are all exposed,
not only the custom TLV types in the 0xE0-0xEF range.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-21 09:37:12 +01:00
Simone Bordet 411624c419 Merge branch 'issue_4540' of https://github.com/m0mus/jetty.project into m0mus-issue_4540 2020-02-21 08:45:21 +01:00
Simone Bordet 0fc12b0681 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-20 11:23:49 +01:00
Simone Bordet 2958cb1d62
Merge pull request #4544 from eclipse/jetty-9.4.x-4541-OptimalLargeResponseHeader
Issue #4541 Large response header
2020-02-20 11:17:39 +01:00
Greg Wilkins b46b25b450 release buffer on overflow
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-19 22:38:58 +01:00
Dmitry Kornilov ab94409574 ProxyConnectionFactory should not ignore TLVs
Signed-off-by: Dmitry Kornilov <dmitry.kornilov@oracle.com>
2020-02-19 15:07:49 +01:00
Lachlan Roberts f6195b39ea Issue #4581 - fix checkstyle errors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-18 13:52:19 +11:00
Lachlan Roberts 55748f12c2 Issue #4581 - remove unnecessary javadoc on Override methods
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-18 11:33:56 +11:00
Simone Bordet 3129202e8a Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-17 17:40:06 +01:00
Simone Bordet f2c977d619 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-17 00:54:22 +01:00
Simone Bordet ed7f337856 Issue #4518 - Add a mechanism that allows running multiple protocols on the same port.
Made test methods public, so that they will work fine in JDK 11 and JPMS.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-17 00:53:44 +01:00
Simone Bordet 612a70b5be Issue #4518 - Add a mechanism that allows running multiple protocols on the same port.
Fixed tests after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-16 22:17:13 +01:00
Simone Bordet b73892ccfb Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-16 19:41:49 +01:00
Simone Bordet 9f7a82b128
Merge pull request #4519 from lorban/composable-conn-factories
Fixes #4518 -  Add a mechanism that allows running multiple protocols on the same port.
2020-02-16 19:25:04 +01:00
Simone Bordet 6f211d7a34 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-16 17:29:10 +01:00
Greg Wilkins 652428ad70 Tests #4573 X-Forwarded ordering
Added tests for header ordering
fixed cut-and-paste error of _for to _host

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-16 11:04:34 +01:00
Joakim Erdfelt e363997432
Issue #3924 - Remove Resource.writeTo()
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-02-07 12:21:23 -06:00
Greg Wilkins f50c2654b9 Fixes #4541 Large Headers
Added a HEADER_OVERFLOW result as per review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-06 21:17:58 +01:00
Simone Bordet 8197c12325 Code cleanup.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-06 16:32:19 +01:00
Ludovic Orban 386d9348ca Use contants for CR and LF fields index
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-06 10:06:33 +01:00
Greg Wilkins 1b59e42294 Issue #4541 Large response header
Fix #4541 by initially allocated a header buffer of `min(_config.getResponseHeaderSize(), _config.getOutputBufferSize())`
Only allocate a buffer of `getResponseHeaderSize` if an overflow results.

This should have no effect on the majority of responses where `getOutputBufferSize` is greater than `getResponseHeaderSize` other than the cost of a min operation.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-05 10:29:41 +01:00
Ludovic Orban 5df1ad9b66 change the format of detector's generated protocol name
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-04 12:42:35 +01:00
Ludovic Orban 58b1db610c detectAndUpgrade() shortcut on empty buffer
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-04 10:49:27 +01:00
Ludovic Orban 37edc016d2 improve debug logs
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-04 09:21:41 +01:00
Ludovic Orban 75b4719592 Implement detector connection factory with protocol detection mechanism
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-03 16:56:53 +01:00
Jan Bartel fe8b11dd48 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-02-01 11:27:09 +01:00
Jan Bartel ecd0fe97f7
Issue #4520 Reinstate throw of UnreadableSessionDataException (#4528)
* Issue #4520 Reinstate throw of UnreadableSessionDataException

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-02-01 11:13:58 +01:00
Greg Wilkins b6f2fd2432
Issue #4529 Servlet in error page (#4530)
Added option for #4529 to control showing the servlet in an error page.
Error configuration really needs a module, but will add in 10 with a refactor.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-31 19:53:05 +01:00
Greg Wilkins f88eb73a91
Issue #4533 Hard close from Dispatcher (#4534)
* Issue #4533 Hard close from Dispatcher

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

#4533 Do hard close from Dispatcher so response wrappers may intercept close.

* Issue #4533 Hard close from Dispatcher

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

#4533 improve test after review

* Issue #4533 Hard close from Dispatcher

Some renaming of methods to make it clear that softClose should only be used as part of sendError handling.  If softClose is used by other components, then sendError can be prevented from setting the error status.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-31 11:55:14 +01:00
Simone Bordet ce6e146ac1
Merge pull request #4489 from eclipse/jetty-10.0.x-2643-pkcs12_keystores
Fixes #2643 - Switch SslContextFactory.keystoreType from JKS to PKCS12.
2020-01-30 19:28:49 +01:00
Simone Bordet 4b9fec0cf3 Updates after review.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-30 17:53:41 +01:00
Greg Wilkins 5aaec6e23f
Issue #4321 Refactored Graceful shutdown (#4482)
* Issue #4321 Refactored Graceful shutdown

removed stopTimeout from all abstractLifeCycles.  It is on Graceful.LifeCycle, which is only implemented by components that can start a graceful shutdown (eg Server, ContextHandler and QueuedThreadPool)

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

* Issue #4321 Refactored Graceful shutdown

cleanup after review

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

* Issue #4321 Refactored Graceful shutdown

reinstate other stop tests (more work to do).

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

* Issue #4321 Refactored Graceful shutdown

Fixes for stop test by improving LocalConnector shutdown handling

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

* Issue #4321 Refactored Graceful shutdown

Removed broken test on LocalConnector that is already tested in GracefulStopTest

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

* Issue #4321 Refactored Graceful shutdown

Fixed all stop tests

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

* Issue #4321 Refactored Graceful shutdown

fixed checkstyle

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

* Issue #4321 Refactored Graceful shutdown

No stopTimeout JMX attribute

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

* Issue #4321 Refactored Graceful shutdown

Dump stopTimeout
test with default stopTimeout

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

* Issue #4321 Refactored Graceful shutdown

USe sendError for 503

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

* Issue #4321 Refactored Graceful shutdown

minor cleanups

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

* Issue #4321 Refactored Graceful shutdown

Simplifications after review

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

* Issue #4321 Refactored Graceful shutdown

after review

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

* Issue #4321 Refactored Graceful shutdown

after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-30 17:05:03 +01:00
Jan Bartel 45771dbd26 Fix bad merge 2020-01-29 12:08:13 +01:00
Jan Bartel 79a337567f Issue #4247 use context default for samesite cookie attribute (#4512)
* Issue #4247 use context default for samesite cookie attribute

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-01-29 11:54:43 +01:00
Greg Wilkins 842fa6aa53 Issue #4504 Forwarded Host and Server (#4511)
X-Forwarded-Host has precedence of X-Forwarded-Server and outcome is not order dependent.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-29 11:54:43 +01:00
Jan Bartel 9850c29839
Issue #4247 use context default for samesite cookie attribute (#4512)
* Issue #4247 use context default for samesite cookie attribute

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-01-29 11:05:35 +01:00
Greg Wilkins 56754f4a29
Issue #4504 Forwarded Host and Server (#4511)
X-Forwarded-Host has precedence of X-Forwarded-Server and outcome is not order dependent.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-24 11:20:52 +01:00
Lachlan 681d0bee3c
Merge pull request #4498 from eclipse/jetty-10.0.x-4383-MultiPartNPE
Issue #4383 - synchronize multiparts for cleanup from different thread
2020-01-24 11:42:59 +11:00
Lachlan Roberts f76687ad68 Issue 4383 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-24 11:06:37 +11:00
Lachlan Roberts f9f2ccaefa Issue #4383 - check for non multipart content type in constructor
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-22 14:26:36 +11:00
Lachlan Roberts 0ab7751ef2 Issue #4383 - fix javadoc build issue
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-21 18:22:22 +11:00