Commit Graph

1891 Commits

Author SHA1 Message Date
Joakim Erdfelt 1732ffca51 Updating to version 9.4.11-SNAPSHOT 2018-05-03 11:48:05 -05:00
Joakim Erdfelt daa59876e6 Updating to version 9.4.10.v20180503 2018-05-03 10:55:19 -05:00
Lachlan Roberts 04ae33c4ac Switched getHeaderInfo from recursion to iteration.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-25 16:09:55 +10:00
Lachlan Roberts 7adad0bdc6 Merge remote-tracking branch 'origin/jetty-9.4.x-1555-wwwAuthenticate-Parsing' into jetty-9.4.x-1555-wwwAuthenticate-Parsing 2018-04-24 11:28:44 +10:00
Lachlan Roberts fc5c438d72 Changes after review 1
Changed the base64 pattern to only accept token68 pattern from rfc7235#appendix-C
Add limit to recusion depth of multiple challange matching to stop any vulnerablilties related to malicious server overflowing client stack
Regex no longer allows trailing whitespace

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-24 11:16:31 +10:00
Lachlan adb844de64
Merge branch 'jetty-9.4.x' into jetty-9.4.x-1555-wwwAuthenticate-Parsing 2018-04-18 16:06:02 +10:00
Lachlan Roberts 5a1325949e Changes to allow for other formats specified in RFC7235
- Multiple challanges in the same header can now be parsed successfully.
    - Will now allow a base64 value after the auth-scheme instead of parameters. Which can be used for the Negotiate auth-scheme.
    - Added more in depth testing for tricky cases.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-18 16:02:33 +10:00
Lachlan Roberts 497b87eb2e Fixed bug with regex and style cleanup.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-17 17:34:16 +10:00
Lachlan Roberts ee09904809 Reworked the way authentication parameters are parsed.
Removed the regex to separate out the realm parameter and instead parse it with the other parameters into HeaderInfo.

Changed HeaderInfo to store the parsed parameters as a Map instead of the un-parsed parameters in a string.

The parsing of the parameters is now done in AuthenticationProtocolHandler.newHeaderInfo(String) and then passed into the HeaderInfo instead of Parsing it in DigestAuthentication.

Replaced the usage of splitParams(String) with QuotedCSV used to parse the parameters.

Added test to check the ordering of parameters doesn't matter.

Allow not to have a realm parameter, changed DigestAuthentication.matches() to not match if realm is null, so that Digest Authentication requires realm parameter but any Basic Authentication can be done without it. There is currently no tests for this.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-17 17:04:44 +10:00
Lachlan Roberts 29dccf668c Changes after review 1
Regex will now look for comma and spaces before realm. Preventing issues accepting params with realm as a suffix like blahrealm.
Stops adding double commas when extracting realm param.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-12 10:33:47 +10:00
Lachlan Roberts bc4ad7c61a Changed regex for AUTHENTICATE_PATTERN so that the realm doesn't need to appear as first parameter. #1555
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-04-10 14:47:00 +10:00
Simone Bordet ef48bc6f58 Fixes #2388 - AtomicBiInteger.compareAndSet(long,int,int) not using encoded parameter.
Fixed method, added Javadocs and cleaned up code with a few renamings
to better comply with AtomicLong naming.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-28 00:37:21 +02:00
Joakim Erdfelt a74a328024 Merge branch 'release-9.4.9' into jetty-9.4.x 2018-03-21 16:33:56 -05:00
Simone Bordet e651d2d69b
Fixes #2350 - Support multiplexing in RoundRobinConnectionPool. (#2352)
Introduced ConnectionPool.Multiplexable for connection pools that support multiplexing.
Reworked RoundRobinConnectionPool to support multiplexing.
Moved tests to test RoundRobinConnectionPool with both HTTP/1.1 and HTTP/2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-21 16:29:30 +01:00
Simone Bordet 8251ed5a12
Fixes #2311 - TimeoutException when server sends unexpected content. (#2324)
Now exiting the parse loop when the response is complete; if there
are bytes remaining in the buffer, then it's cleared out.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-21 16:25:18 +01:00
Joakim Erdfelt c3cc138a3b Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
Joakim Erdfelt 1f8159b1e4 Updating to version 9.4.9.v20180320 2018-03-20 07:18:24 -05:00
WalkerWatch 534b8ea38b Add edit warning for .mod files. Resolves #173 2018-03-15 13:23:42 -04:00
Joakim Erdfelt 484280bac6 Issue #2218 - Windows Selector Bug
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-14 17:42:50 -05:00
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