Commit Graph

1872 Commits

Author SHA1 Message Date
Simone Bordet 8b391a88dd Fixes #2318 - HttpParser.Listener.onBadMessage() should take BadMessageException.
Changed the signature of HttpParser.Listener.onBadMessage()
to take a BadMessageException and updated dependent code.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-12 19:51:57 +01:00
Greg Wilkins cf0b6140fe
Merge pull request #2299 from olamy/feature/available_processors
#2298 Override the processor number with an environment variable
2018-03-08 08:36:52 +11:00
olivier lamy 7004aaa538 #2298 Override the processor number with an environment variable
Signed-off-by: olivier lamy <olamy@webtide.com>
2018-03-07 21:02:26 +10:00
Simone Bordet b71cd70bf7 Fixes #2297 - HTTP/2 client transport should honor HttpClient.connectBlocking.
Introduced property connectBlocking in HTTP2Client so that it can
be forwarded by HttpClient and then used for HTTP/2 connects.

Also introduced HTTP2Client.bindAddress, again forwarded from HttpClient.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-07 11:52:28 +01:00
Greg Wilkins 74055b9837
Jetty 9.4.x 2293 pending multiplexed (#2294)
Issue #2293 Pending Multiplexed Connections

Added a AtomicBiInteger to allow both total connections and pending connections to be encoded in the
same atomic int.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-07 19:31:22 +11:00
Greg Wilkins bcb9fa3b32
Merge pull request #2257 from lachlan-roberts/jetty-9.4.x-2206-ReferenceEquality
Resolved errorprone ReferenceEquality warnings #2206
2018-03-07 11:11:40 +11:00
Simone Bordet 8fcfdd9d7f Fixes #2273 - Test failure: RoundRobinConnectionPoolTest.testRoundRobin.
Now making sure all connections are opened before testing
the round robin behavior.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-06 10:00:15 +01:00
Greg Wilkins a272fb6e39
Improve executorSizedThreadPool (#2253)
Improve executorSizedThreadPool (#2253)

* Improve executorSizedThreadPool

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

* Improved implementation.

Implemented name, thread priorities, thread group and daemon properties.
Implemented toString(), dump() and using a thread factory.

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

* added threadpool benchmark;

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

* Renamed ExecutorSizedThreadPool to ExecutorThreadPool

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-06 19:07:41 +11:00
Lachlan Roberts 31347db71b changes after second review from gregw
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-06 17:21:15 +11:00
Lachlan Roberts 020ebde77c found additional ReferenceEquality warnings which have been resolved
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-06 14:28:11 +11:00
Lachlan Roberts a639ee9275 Resolved errorprone MissingOverride warnings #2206
`@Override` was added to methods which were missing the annotation #2206

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-01 13:59:25 +11:00
Simone Bordet cd7432da95 Issue #2238 - RoundRobinConnectionPoolTest.testRoundRobin test failure
Improved logging in case of test failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-27 18:49:23 +01:00
Joakim Erdfelt be64f322ad Issue #2217 adding parameter naming to help identify test run 2018-02-26 14:01:26 -06:00
Jesse McConnell cb67476de0
Resolves #2241 clean up javadoc warnings 2018-02-23 14:18:52 -06:00
Jesse McConnell d179bcf7ac
Resolves #2241 clean up javadoc warnings 2018-02-23 14:09:33 -06:00
Greg Wilkins b94d26a720 less fragile tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-02-20 10:19:32 +11:00
Alex Bleasdale 8a17563e6b Fixes #2160 - Digest authentication should use absolute path
Modified uri value in Authorized header as per discussion in #2160.

Signed-off-by: Alex Bleasdale <ableasdale@marklogic.com>
Reviewed-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-29 10:04:44 +01:00
Greg Wilkins c606d5f103 Issue #2126 removed sleep from test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-16 17:56:03 +01:00
Jan Bartel 709da5efc6 Issue #2126 2018-01-16 17:47:07 +01:00
Greg Wilkins f4e37b1adb
Issue #2014 - Unix Socket Client (#2025)
There are still problems with this impl (some client tests ignored) and there is still a work around for the JNR bug 50, however this impl is already much better than the unix socket support that is already in the release.  So will merge for now and put more effort in once there is a JNR fix.

* WIP add unix domain sockets support in HttpClient
* move unix socket client part to unix socket module #2014
* some cleanup #2014
* add missing headers #2014
* add TODO
* UnixSocket client refactor
* cleanup test and pom
* minor changes, use LOG.isDebugEnabled() before using debug method
* add UNIX SOCKET http client test with all other tests, push this to see what happen on Jenkins
* fix some unit tests
* fix more tests
* fix load test
* UnixSocket client
* Demonstrate JNR bug
* Worked around JNR bug 50
* close channel on client side as well
* more details in log
* log file path as well
* #2014 disable test per default as doesn't work on some environement
* Revert "#2014 disable test per default as doesn't work on some environement"
* test only on unix
* Allow test of specific transport(s)
* Move unix socket to /tmp
* move test socket to /tmp
* move test socket to /tmp
* ignore failing tests for now
* fix bean name and possible to use sys prop org.eclipse.jetty.http.client.AbstractTest.Transports with mvn cli
* test isBlank as surefire props is not null
* correctly create tmp file with @Before
* do not delete file
* use /tmp as build directory doesn't seem to work within docker...
* do not delete sock file on client as it is own by the server
* file must not exist when binding unix socket
* #2014 fix license header
* network specific tests assumed
* Fixed to handle null selector keys
* add assume for tests that assume a network connector

Signed-off-by: olivier lamy <olamy@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-13 11:59:47 +01:00
Simone Bordet 0b3a276a9b
Fixes #2117 - Allow to configure HttpClient default request Content-Type (#2118)
* Fixes #2117 - Allow to configure HttpClient default request Content-Type.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-13 10:31:13 +01:00
Greg Wilkins 8b7480f088 Merge branch 'jetty-9.4.x' into jetty-9.4.x-2022-FineGrainedComplianceModes 2018-01-10 22:25:49 +01:00
Simone Bordet 6cefd1c7dd Issue #1918 - Scalable scheduler implementation.
Fixed destroy of HttpChannel for HTTP/1.1: not at release()
because the connection and therefore the channel will be reused,
but at close(), when we're sure the connection will not be reused.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-10 19:42:28 +01:00
Greg Wilkins 7138dc3828
Jetty 9.4.x #1918 scalable scheduler3 (#2101)
* Scalable scheduler changes for #1918
* Added HttpChannel.destroy to destroy CyclicTimer
* fixed rebase with HttpConnectionOverFCGI
* renamed to acquire
* Destroying the HttpChannel consistently in all transports.
* updated headers
* cleanup after final review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-10 16:56:41 +01:00
Greg Wilkins 356bf2e06f
Issue #2046 - Graceful stop of connections (#2100)
* Clean up of actions (now updates) prior to #2046 fix
* prevent exceptions from termincating lifecycle doStop or destroy
* Refactored ManagedSelector stop to always close endpoints
* Fixed NPE if SelectorManager is already stopped
* refactored after review
* further simplifications after review
* Wait only for oshut endpoints
* Cleanup from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-09 20:36:41 +01:00
Joakim Erdfelt 21365234f8 Issue #2108 - Updating license headers for year 2018 2018-01-09 09:44:41 -06:00
Joakim Erdfelt 41ed9f29f4 Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x 2018-01-09 09:37:25 -06:00
Joakim Erdfelt fa4c7b0ca9 Issue #2108 - Updating license headers for year 2018 2018-01-09 08:39:37 -06:00
Joakim Erdfelt 067fc5d2d8 Issue #2108 - Upgrade licenses for 2018 2018-01-09 07:42:06 -06:00
Greg Wilkins 54f49dec7d Merge branch 'jetty-9.4.x' into jetty-9.4.x-2022-FineGrainedComplianceModes 2018-01-09 13:32:19 +01:00
Greg Wilkins 88cf4603c5
Merge branch 'jetty-9.4.x' into bugfix/javadoc_fixes_2056 2018-01-08 21:31:48 +01:00
Greg Wilkins a81c1f3880 fixes after review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-01-08 16:09:22 +01:00
olivier lamy 1a49a6fb7e more javadoc fixes #2056
Signed-off-by: olivier lamy <olamy@webtide.com>
2018-01-08 12:28:12 +11:00
Simone Bordet 4606c773b1 Issue #2065 - Backport #347 to Jetty 9.2.x.
Fixed the mistake of resetting idleTimeoutStamp rather than
idleTimeoutGuard.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-05 10:47:39 +01:00
Simone Bordet 48c77b8608
Fixes #2088 - Recycle HTTP/2 channels on the client. (#2089)
Removed the distinction between pushed and non-pushed channels; only
non-pushed channels are released and recycled if they're not failed.

Properly resetting HttpReceiverOverHTTP2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-04 07:09:08 -08:00
Greg Wilkins 41050cd8a4
Issue #2081 No idle timeout exception when dispatch is delayed (#2083)
Issue #2081 No idle timeout exception when dispatch is delayed
* Delegate the readtimeout handling to HttpChannel so that a delayed dispatch can be ended.
* Added unit test for delayed dispatch idle
* Now using HttpInput.onIdleTimeout() to fail the HttpInput, and then dispatching the request in case it has not been dispatched yet. This ensure consistent behavior independently of the value of HttpConfiguration.delayDispatchUntilContent.
* Fixed for both HTTP/1.1 and HTTP/2.
* Added tests for non-blocking reads.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-04 13:26:31 +01:00
Greg Wilkins 22beb1d02a Updated tests to use _LEGACY modes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2017-12-27 14:16:23 +01:00
Greg Wilkins 7e516e29fb pass existing compliance tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2017-12-24 18:00:03 +01:00
Greg Wilkins d8dead35ae Issue #2022 Fine Gramed Compliance Modes
Added HttpComplianceSection and an EnumSet within HttpCompliance

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2017-12-24 14:41:18 +01:00
Greg Wilkins c5fc35fa05 Merge branch 'jetty-9.4.x' into jetty-9.4.x-2022-FineGrainedComplianceModes 2017-12-23 11:12:48 +01:00
Simone Bordet 005ae95bea
Fixes #1949 - Client-side problems with digest authentication. (#1991)
Introduced ContentProvider.isReproducible() to detect whether the
request content can be provided more than once, and modified
ContentProvider implementation accordingly.

Modified AuthenticationProtocolHandler to not send an authenticated
request if the content is not reproducible.

Modified AuthenticationProtocolHandler to tolerate request failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-21 02:34:39 -08:00
Joakim Erdfelt 2dd970b055 Updating to version 9.2.24-SNAPSHOT 2017-12-18 10:43:47 -06:00
Joakim Erdfelt cdbe733684 Updating to version 9.2.23.v20171218 2017-12-18 09:06:48 -06:00
Simone Bordet b68fbc4cfb Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2017-12-16 23:36:53 +01:00
Simone Bordet 37388ef105 Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2017-12-16 23:28:05 +01:00
Simone Bordet eaa4c70cfc Issue #2065 - Backport #347 to Jetty 9.2.x.
Implemented as integer guard + timestamp.
The timestamp is not enough to guard against long times spent sending
(and/or in application callbacks during sends).
2017-12-16 22:25:59 +01:00
Simone Bordet ce4fad3deb Fixes #2065 - Backport #347 to Jetty 9.2.x. 2017-12-15 17:48:47 +01:00
Greg Wilkins c6c5a3b890 Merge branch 'issue-2022' of https://github.com/Baqend/jetty.project into jetty-9.4.x-2022-FineGrainedComplianceModes 2017-12-15 16:19:14 +01:00
fb 7ee8bb82c6 Same code style fixes and remove unnecessary code reformatting
Signed-off-by: fb <fb@baqend.com>
2017-12-15 15:23:17 +01:00
fb a324a5ad77 Implement weak http header parsing and make the compliance mode configurable in the client
Signed-off-by: fb <fb@baqend.com>
2017-12-15 15:13:48 +01:00