Commit Graph

3084 Commits

Author SHA1 Message Date
Olivier Lamy 9bc4cd32fc backport of fixes for #592 (#1208)
Signed-off-by: olivier lamy <olamy@webtide.com>
2017-01-01 20:33:51 +11:00
Joakim Erdfelt 7494914ff6 Updating to version 9.3.16-SNAPSHOT 2016-12-20 13:09:32 -07:00
Joakim Erdfelt 680ecd646b Updating to version 9.3.15.v20161220 2016-12-20 12:31:58 -07:00
cao tianze 0a97b66b14 delete redundant addBean(serverChannel) invoke
Signed-off-by: cao tianze <hnrcao@qq.com>
2016-12-20 01:15:32 +08:00
Joakim Erdfelt 6b3b59df43 Updating to version 9.2.21-SNAPSHOT 2016-12-16 16:23:06 -07:00
Joakim Erdfelt bcbcee7f23 Updating to version 9.2.20.v20161216 2016-12-16 15:47:41 -07:00
Joakim Erdfelt c70fa88be0 Issue #1175 - Correcting test DispatchType 2016-12-14 12:16:53 -07:00
Joakim Erdfelt f91d1e01fe Issue #1175 - More realistic test of commons-fileupload behavior 2016-12-14 11:53:10 -07:00
Joakim Erdfelt f846b37cbb Issue #1175 - Adding testcase to Jetty 9.3.x 2016-12-14 10:58:36 -07:00
Simone Bordet 07c9bc5a51 Fixes #1169 - HTTP/2 reset on a stalled write does not unblock writer thread.
The fix notifies the transport when a reset frame is received,
allowing the transport to fail the write callback which then notifies
the application, either by throwing (in case of blocking writes) or
by calling error listeners.

Also added a guard, in HttpChannel.handle() for the ERROR_DISPATCH case,
that checks if the response is already committed, and if so, abort
the transport - similar to what's already there for 9.4.
2016-12-14 11:07:00 +01:00
Greg Wilkins af5d27c2f7 Issue #1146 DecryptedEndPoint deadlock 2016-12-07 22:50:27 +11:00
Simone Bordet dd76ed2449 Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2016-11-25 09:04:16 +01:00
Simone Bordet f254dbc0b6 Fixes #1130 - PROXY protocol support reports incorrect remote address. 2016-11-25 08:56:56 +01:00
Joakim Erdfelt fd20d46659 Issue #1062 - adding https/ssl/tls test varient to ThreadStarvationTest 2016-11-17 16:42:37 -07:00
Jan Bartel 05f2e56aa1 Merge pull request #1093 from nevafuse/patch-3
Keep restored file if saving periodically
2016-11-16 10:53:59 +11:00
nevafuse 236571eaee only periodically save recently accessed sessions
Signed-off-by: nevafuse <nevafuse@gmail.com>
2016-11-12 22:12:56 -05:00
nevafuse e05faf77c8 keep restored file if saving periodically
Signed-off-by: nevafuse <nevafuse@gmail.com>
2016-11-12 22:11:17 -05:00
Jesse McConnell 9a6f68be78 Merge branch 'release-9.3.14' into jetty-9.3.x 2016-11-07 10:45:04 -06:00
Simone Bordet 998c5729ec Fixes #1072 - InetAccessHandler needs InetAddress & Path based restrictions like IPAccessHandler did.
Introduced isAllowed(InetAddress, HttpServletRequest) so that it
would be possible to make access decisions also based on request
information such as context, path, headers, etc.
2016-11-07 16:20:15 +01:00
Simone Bordet fe1aed24c0 Code cleanup. 2016-11-07 16:15:11 +01:00
Greg Wilkins bbc21e8648 Issue #1065 Improved error message on setBufferSize 2016-11-03 15:06:32 +11:00
Joakim Erdfelt 2c38511828 Updating to version 9.3.15-SNAPSHOT 2016-10-28 13:01:34 -07:00
Joakim Erdfelt 14611d2f76 Updating to version 9.3.14.v20161028 2016-10-28 12:21:02 -07:00
Simone Bordet 206122756f Fixes #1037 - Don't execute AsyncListener.onTimeout events in spare Scheduler-Thread.
Now calling onTimeout() from pooled threads.
Restored AsyncListener test cases.
2016-10-28 12:01:39 +02:00
Simone Bordet 33eb768d69 Fixes #1029 - Restore Request.setHttpVersion().
Also cleaned up the asymmetry in MetaData between the setter
(setHttpVersion()) and the getter (getVersion()).
2016-10-25 15:45:29 +02:00
Joakim Erdfelt fccffdb526 Merge branch 'release-9.3.13' into jetty-9.3.x 2016-10-20 09:25:57 -07:00
Vladimir Bukhtoyarov bbce9df664 Enhancement for detection of insufficient threads (#1010)
* Issue #586 Enhancement for detection of insufficient threads

Do not count acceptors and selectors at server level if connector uses own dedicated thread pool

Signed-off-by: vladimir.bukhtoyarov <jsecoder@mail.ru>
2016-10-20 12:11:23 +02:00
Simone Bordet be93a1ff31 Fixes #292 - NPE in SslConnectionFactory newConnection.
ConnectionFactories may be added after the connector is started.
As such there is always the possibility that creating a new
connection fails because there is no available ConnectionFactory for
that protocol.

Rather than failing with an IllegalStateException instead of a
NullPointerException, we now check at connector start whether the
SslConnectionFactory is properly configured.
This should catch 99% of the cases, where the connector is
misconfigured, reporting the error earlier and explicitly
(connector does not start) rather later and hidden (connection cannot
 be created).
2016-10-17 19:14:01 +02:00
Simone Bordet ad8bdde4f3 Code cleanup. 2016-10-17 18:51:28 +02:00
Greg Wilkins 6adfc324ad remove blockfor #1009 2016-10-17 11:43:58 +11:00
Joakim Erdfelt ade14ba34b Updating to version 9.3.14-SNAPSHOT 2016-10-14 11:33:51 -07:00
Joakim Erdfelt c3a78e70a8 Updating to version 9.3.13.v20161014 2016-10-14 10:39:37 -07:00
Greg Wilkins cb74cb8c1f fixed racew in unit test 2016-10-14 15:40:11 +11:00
Simone Bordet 12e907d162 Fixes #999 - Create a Flight Recorder module. 2016-10-13 11:57:37 +02:00
Jesse McConnell 863913b64e set for dev 2016-09-30 19:05:47 +00:00
Jesse McConnell b91cc8a4ea set for release 2016-09-30 18:01:20 +00:00
Simone Bordet 38d48395b0 Issue #918 - Support certificates hot reload.
Introduced SslContextFactory.reload(Consumer) to perform atomic
reload of SslContextFactory.
2016-09-30 17:48:09 +02:00
Simone Bordet 0f97c3df5d Fixes #966 - Remove usages of ConcurrentArrayQueue. 2016-09-28 11:40:39 +02:00
Simone Bordet efe339e246 Code cleanup. 2016-09-28 11:40:39 +02:00
Simone Bordet ad00e19328 Issue #960 - Async I/O spin when reading early EOF.
Now testing the return value of onEarlyEOF() and calling the
application when the value is true.
This means that the application can now consume the early EOF and the
spin does not happen.
2016-09-26 11:48:33 +02:00
Greg Wilkins 4fca2bf8af Merge remote-tracking branch 'origin/jetty-9.2.x' into jetty-9.3.x 2016-09-21 14:00:49 +10:00
Greg Wilkins 534fb8c427 Reset Response buffer size #940 2016-09-21 12:37:58 +10:00
Joakim Erdfelt b0880f617a Merge branch 'release-9.3.12' into jetty-9.3.x 2016-09-20 14:39:08 -07:00
Simone Bordet 9848b33ec9 Fixes #915 - The jetty-maven-plugin:stop goal doesn't stop everything completely.
Closing the serverSocket when exiting ShutdownMonitorRunnable.
2016-09-16 11:33:21 +02:00
Jan Bartel 5efb6d698a Merge pull request #928 from nevafuse/patch-1
add schema variables
2016-09-16 10:52:01 +10:00
nevafuse 0634882b7c prevent needing analyze privilege when using getIndexInfo
Signed-off-by: nevafuse <nevafuse@gmail.com>
2016-09-15 16:41:33 -04:00
nevafuse 459abd144e add schema variables
Signed-off-by: nevafuse <nevafuse@gmail.com>
2016-09-15 16:41:11 -04:00
Joakim Erdfelt 6cf10172ca Updating to version 9.3.13-SNAPSHOT 2016-09-15 07:34:52 -07:00
Joakim Erdfelt 8b35fdc5a5 Updating to version 9.3.12.v20160915 2016-09-15 06:48:16 -07:00
Simone Bordet cb89ea8466 Fixes #131 - Improve Connector Statistic names and values.
Removed references to deprecated ConnectorStatistic in favor of
ConnectionStatistics.
2016-09-14 17:24:45 +02:00
Simone Bordet 2111775cb4 Fixes #131 - Improve Connector Statistic names and values. 2016-09-14 14:01:30 +02:00
Greg Wilkins 68340a94d0 Issue #911 encode requestURI in startAsync(req,res) 2016-09-09 10:12:08 +10:00
Greg Wilkins ab579d542b Issue #911 encode requestURI in startAsync(req,res) 2016-09-09 10:12:08 +10:00
Greg Wilkins 4312995d89 Issue #911 encode requestURI in startAsync(req,res) 2016-09-09 09:19:01 +10:00
Greg Wilkins 1247380976 Issue #911 encode requestURI in startAsync(req,res) 2016-09-09 09:09:51 +10:00
Joakim Erdfelt fb7da26ad2 Updating to version 9.2.20-SNAPSHOT 2016-09-08 13:04:11 -07:00
Joakim Erdfelt 7b94bc32f4 Updating to version 9.2.19.v20160908 2016-09-08 12:11:44 -07:00
Greg Wilkins f7d017ca1a Issue #911 encode requestURI in startAsync(req,res) 2016-09-08 15:00:54 +10:00
Jan Bartel 09da3248e5 Issue #909 2016-09-08 14:24:29 +10:00
Greg Wilkins 28ca70378e Issue #844 Thread Limit Handler (#857)
* Issue #844 DoS Handler

First cut at implementation of Thread limiting handler for #844

* Added modules, simplified API, added IP exemptions

* fixed xml

* fixed preallocation

* simplified code
2016-09-08 08:49:03 +10:00
Simone Bordet 9d72e0d94e Improved JMX attributes. 2016-09-05 23:28:15 +02:00
Simone Bordet 08bf15634a Updated copy constructor. 2016-09-05 23:14:26 +02:00
Simone Bordet 89b20b4692 Merged branch 'jetty-9.3.x-845'. 2016-09-05 21:36:04 +02:00
Simone Bordet 705a68dfc4 Issue #845 - Improve blocking IO for data rate limiting.
Moved tests to run HTTP and HTTP/2 tests, and added more test cases.
2016-09-05 19:13:05 +02:00
Greg Wilkins 1f7c5a5b20 Issue #898
Added addCSV method to HttpFields to more efficiently add values to a CSV field without duplicates.
Improved usage of QuotedCSV and removed older parsing

Used new method in GazipHttpOutPutInterceptor to avoid duplicate Vary fields
2016-09-02 14:57:13 +10:00
Greg Wilkins 0c6c11d79d Issue #897
If a request is not handled within the scope of the GzipHandler, the gzip interceptor is removed so it cannot be used by any subsequent handlers.
If the request is handled, it is left in place to be used by any async handling.
2016-09-02 12:14:23 +10:00
Greg Wilkins a799b21eb3 fixed merge 2016-09-01 16:41:49 +10:00
Greg Wilkins c2621bcad6 Merge remote-tracking branch 'origin/jetty-9.2.x' into jetty-9.3.x 2016-09-01 16:29:00 +10:00
Greg Wilkins f7c32c5fc7 Issue #882 IPv6 map
The new IPv6 capable InetAddressSet has been added as an alternative for IPAddressMap
The IncludeExclude class has been generalized to IncludeExcludeSet that can have a different
Predicate type to the set type and this works well with InetAddressSet.

However for #881 and #883, this may not be enough and Map semantics may need to be added.

The IPAccessHandler also has path mappings supported, which could need the map semantics, so for now a new InetAccessHandler has been
added that just uses an IncludeExcludeSet<InetAddressSet>, but this has yet to be tested.

The AbstractProxyServlet uses a host:port combinations, so IncludeExcludeSet<InetAddressSet> is not directly applicable.
2016-09-01 16:12:35 +10:00
Greg Wilkins f856107301 Merge remote-tracking branch 'origin/jetty-9.2.x' into jetty-9.3.x 2016-08-31 19:05:57 +10:00
Greg Wilkins 0155ae761c Issue #880 Improve IPv6 support
For #880 added the HostPort class, which was used to fix #878, #879, #884 and #886
2016-08-31 16:46:11 +10:00
Simone Bordet 0322a1640d Code cleanup. 2016-08-26 12:49:31 +02:00
Simone Bordet 2389b65578 Code cleanup. 2016-08-26 10:45:04 +02:00
Joakim Erdfelt 4c5d0319b1 Minor code cleanup
+ Changed variable from rfc7230 to rfc7239
+ Javadoc updates
2016-08-25 11:40:51 -07:00
Greg Wilkins 5528dc60f5 Issue #845 data rate limits
Converted to long minimum data rather than the numerically sensitive data rate.
2016-08-17 17:24:57 +10:00
Greg Wilkins 19a20a486d ssue #845 data rate limits
double
2016-08-17 07:11:36 +10:00
Greg Wilkins a60fe5e523 Issue #845 data rate limits
use nanotime
2016-08-16 23:15:30 +10:00
Greg Wilkins d4ebdd6875 Issue #845 data rate limits
added @sbordets feedback
2016-08-16 21:47:49 +10:00
Greg Wilkins 83f503b86f Issue #845 data rate limits
test for variable idle time
2016-08-16 17:40:18 +10:00
Greg Wilkins 34f22dcbce Issue #845 data rate limits
Added data rate unit tests
2016-08-16 17:09:46 +10:00
Greg Wilkins 3d93d39b39 Issue #845 data rate limits
Initial thoughts
2016-08-16 16:24:14 +10:00
Greg Wilkins 94c1424029 Issue #841 support reset in buffering interceptors
Added resetBuffers to the output interceptor.
2016-08-15 19:38:18 +10:00
Simone Bordet 9f9e9ecaf9 Changes for Issue #824 (#825)
* Issue #824 - Implement notifications of asynchronous error conditions for HTTP/2.

Introduced new method HttpChannelState.asyncError() to be called in
case of asynchronous errors, i.e. those errors that do not happen in
the HttpChannel.handle() loop.

Implemented HTTP/2 callbacks to call HttpChannelState.asyncError()
and plug in the existing error handling mechanism.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Issue #824 - Implement notifications of asynchronous error conditions for HTTP/2.

Improved implementation to ignore idle timeouts for streams and
session in case that requests are being handled, matching the HTTP/1.1
behavior.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2016-08-12 11:02:52 +02:00
Greg Wilkins 5fefd5d8bd Issue #185 Implement RFC 7239
Improved test harness
Added more configurability
Fixed SSL session and certificate bugs
2016-08-12 11:39:36 +10:00
Greg Wilkins 5c9a637d4f UnitTest #833 2016-08-12 10:29:38 +10:00
Greg Wilkins b45af1a3c9 Issue #185 Implement RFC 7239
Also handle legacy Https headers for #834
2016-08-11 18:56:51 +10:00
Greg Wilkins f493e0f528 remove println 2016-08-10 16:26:43 +10:00
Greg Wilkins cc8c3590c0 Issue #786 Buffering Response Handler
Fixed commit of empty buffers
2016-08-10 16:01:56 +10:00
Andriy Rosa 1d968ef53a HttpOtput: fix async write for heap ByteBuffer (#811)
* Remove unused imports

Signed-off-by: arhimondr <andriyrosa@gmail.com>

* Improve HttpOtputTest

HttpOutputTest gives false positive results for couple of tests
(testAsyncWriteBufferLargeHEAD, testAsyncWriteBufferLarge). This happens
because only the tail of the response is being checked, and that fact that
the beginning of the response in not being sent is ignored.

For regular encoding responses it is easy to check that the entire content is
received by checking it with `response.endWith(expectedContent)`. However
for chunked responses extra parsing is required to check the content in such way.
For the sake of code simplicity only start and end of the response is being checked
for the chunked encoded responses.

Signed-off-by: arhimondr <andriyrosa@gmail.com>

* Add testAsyncWriteBufferLargeDirect test to HttpOutputTest

Just to verify that everything is right when sending native buffers
asynchronously instead of heap ones.

Signed-off-by: arhimondr <andriyrosa@gmail.com>

* HttpOtput: fix async write for heap ByteBuffer

Fix bug when asynchronous writes of Heap ByteBuffer were ignored.

ByteBuffer position was moved to the end in the constructor,
then in the `process` method `if (_buffer.hasRemaining())` condition
was always evaluated to `false` and the actual write was not performed.

Add assertion in `HttpOutputTest` to verify that after the asynchronous
write position of the buffer is always at the end.

Signed-off-by: arhimondr <andriyrosa@gmail.com>
2016-08-05 08:51:10 +10:00
Greg Wilkins d57a11668d Issue #798 Sporadic async IO failure 2016-08-03 17:22:31 +10:00
Greg Wilkins 83483e1f69 Response.reset does not clear session cookie #789
Added unit test
2016-08-02 13:49:05 +10:00
Greg Wilkins e0a1a1988f Response.reset does not clear session cookie #789 2016-07-29 16:45:09 +10:00
Greg Wilkins ad93923e1d Merge branch 'jetty-9.3.x' of github.com:eclipse/jetty.project into jetty-9.3.x 2016-07-29 16:43:04 +10:00
Greg Wilkins 23cb28e856 improved debug logging of request/response 2016-07-29 12:34:12 +10:00
Joakim Erdfelt 2830e51e04 Merge branch 'jetty-9.3.x' into release-9.3.11 2016-07-28 12:20:36 -07:00
Greg Wilkins ffb52a948b Buffering Response Handler #786 2016-07-28 15:05:44 +10:00
Greg Wilkins 32e2ee8cb9 start property for stopTimeout #774 2016-07-27 14:12:46 +10:00
Niels Basjes 117cbc2bd1 Fix NCSA request log in case of missing useragent. (#770)
Signed-off-by: Niels Basjes <niels@basjes.nl>
2016-07-27 10:32:31 +10:00
Greg Wilkins e53ea55f48 Issue #752 SETTINGS_MAX_HEADER_LIST_SIZE
Defined missing status codes (removed old/wrong javadoc)
Changed use of 413 to 431
Received SETTINGS_MAX_HEADER_LIST_SIZE is set on hpack encoded and warning generated only for large responses.
2016-07-23 12:17:50 +10:00
Jan Bartel 92e91e8695 Revert "Issue #759"
This reverts commit 7b6bf03133.
2016-07-22 16:10:37 +10:00