jkmcl [Sun, 26 Jun 2022 19:13:58 +0000 (03:13 +0800)]
Avoid unnecessary use of Instant.toEpochMilli
Avoid unnecessary use of Instant.toEpochMilli by using Instant.compareTo
to compare Instants direclty
jkmcl [Mon, 20 Jun 2022 11:19:25 +0000 (19:19 +0800)]
Use HTTP header name constants
Use HTTP header name constants instead of string literals.
dependabot[bot] [Fri, 20 May 2022 06:40:23 +0000 (06:40 +0000)]
Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 20 May 2022 06:40:26 +0000 (06:40 +0000)]
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Carter Kozak [Mon, 13 Jun 2022 16:34:37 +0000 (12:34 -0400)]
ResponseEntityProxy.writeTo(null) leaves connections in the correct state
Previously writeTo would conditionally delegate to the wrapped
entity if the provided outputstream was non-null, however in the
null case the entity would not be drained and the connection would
be released potentially with bytes remaining. If this occurs in
practice, it may result in timeouts as the server expects to write
data to the response while the client is attempting to send a
request.
Carter Kozak [Fri, 10 Jun 2022 18:31:04 +0000 (14:31 -0400)]
HTTPCLIENT-2221 Closing a classic response/entity allows connection reuse
Previously, a partially consumed response body closed via
CloseableHttpResponse.close or HttpEntity.close would fully consume
remaining bytes (via close), however it would not release the
connection for reuse.
If CloseableHttpResponse.close was called, it would follow the close
with a discard/disconnect, however if only the entity was closed,
the connection would remain in a checked-out (leaked) state.
Now, we take advantage of the fact that closing a response stream
on any reusable connection is required to drain bytes on closure.
Failures are detected by writeTo and the stream returned by
getContent, so we can be confident that we will not return a
broken connection to the pool.
Oleg Kalnichevski [Tue, 7 Jun 2022 12:42:03 +0000 (14:42 +0200)]
Upgraded HttpClient version to 5.2-beta2-SNAPSHOT
Oleg Kalnichevski [Fri, 3 Jun 2022 21:48:13 +0000 (23:48 +0200)]
Corrected javadoc errors in Base64
Oleg Kalnichevski [Thu, 2 Jun 2022 09:33:17 +0000 (11:33 +0200)]
Updated release notes for HttpClient 5.2-beta1 release
Oleg Kalnichevski [Wed, 1 Jun 2022 20:48:13 +0000 (22:48 +0200)]
Upgraded HttpCore to version 5.2-beta2
j3graham [Sat, 28 May 2022 13:52:24 +0000 (09:52 -0400)]
HTTPCLIENT-2218: Use Java 8 Base64 utility (#370)
Naveen [Thu, 19 May 2022 02:40:14 +0000 (21:40 -0500)]
chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.
Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot
GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
殷成涛 [Wed, 18 May 2022 13:18:25 +0000 (21:18 +0800)]
add br decompression support (#363)
naveensrinivasan [Sun, 15 May 2022 22:29:36 +0000 (17:29 -0500)]
chore(deps): Included dependency review
> Dependency Review GitHub Action in your repository to enforce dependency
> reviews on your pull requests.
> The action scans for vulnerable versions of dependencies introduced by package version
> changes in pull requests,
> and warns you about the associated security vulnerabilities.
> This gives you better visibility of what's changing in a pull request,
> and helps prevent vulnerabilities being added to your repository.
https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
nathannaveen [Fri, 13 May 2022 01:30:12 +0000 (01:30 +0000)]
chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
niranjan ghule [Sun, 8 May 2022 04:33:44 +0000 (10:03 +0530)]
Refactor testcase
niranjan ghule [Wed, 4 May 2022 17:25:56 +0000 (22:55 +0530)]
Remove unused code
Oleg Kalnichevski [Wed, 4 May 2022 19:13:52 +0000 (21:13 +0200)]
HTTPCLIENT-2212: MinimalHttpAsyncClient fails to release client endpoints in case of a connect error (such as TLS handshake failure)
Prashant Singh [Wed, 4 May 2022 05:28:57 +0000 (10:58 +0530)]
Updated copyright statement in NOTICE.txt
Richard Hernandez [Wed, 6 Apr 2022 15:52:09 +0000 (08:52 -0700)]
Create daemon threads in InternalAbstractHttpAsyncClient
Anthony Baldocchi [Wed, 30 Mar 2022 14:31:07 +0000 (09:31 -0500)]
HTTPCLIENT-2080: add getRetryInterval to HttpRequestRetryStrategy for use on retriable IOExceptions (#356)
Ryan Schmitt [Tue, 22 Mar 2022 23:37:25 +0000 (16:37 -0700)]
Fix infinite recursion in SSLConnectionSocketFactory
Oleg Kalnichevski [Thu, 27 Jan 2022 10:59:10 +0000 (11:59 +0100)]
HTTPCLIENT-2200: Protocol interceptors are executed before the connection route has been fully established
Oleg Kalnichevski [Thu, 17 Mar 2022 16:18:12 +0000 (17:18 +0100)]
Upgraded HttpCore to version 5.2-beta1
John Gallagher [Tue, 15 Mar 2022 20:38:52 +0000 (16:38 -0400)]
StringBody: just write the bytes to the output stream
Andriy Redko [Sat, 12 Mar 2022 17:53:45 +0000 (12:53 -0500)]
HTTPCLIENT-2209: Pass HttpContext to AsyncClientConnectionOperator (#353)
Oleg Kalnichevski [Sat, 26 Feb 2022 13:45:43 +0000 (14:45 +0100)]
HTTPCLIENT-2206: Corrected resource de-allocation by fluent response objects
David Schlosnagle [Sat, 26 Feb 2022 11:45:18 +0000 (06:45 -0500)]
Optimize ExecSupport.getNextExchangeId() (#352)
cda007 [Fri, 18 Feb 2022 10:32:30 +0000 (11:32 +0100)]
Added option to set an IOSessionListener on async client builders
Oleg Kalnichevski [Sun, 13 Feb 2022 17:51:34 +0000 (18:51 +0100)]
HTTPCLIENT-2203: Corrected target host normalization by the request execution interceptors; added ContextBuilder with support for preemptive authentication initialization
Oleg Kalnichevski [Thu, 10 Feb 2022 19:33:05 +0000 (20:33 +0100)]
HTTPCLIENT-2202: MemcachedHttpCacheStorage to support MemcachedClientIF interface
Oleg Kalnichevski [Mon, 24 Jan 2022 13:12:56 +0000 (14:12 +0100)]
Fixed incompatibility with older versions of Android shipping with Commons Codec < 1.4
Oleg Kalnichevski [Mon, 24 Jan 2022 12:58:07 +0000 (13:58 +0100)]
Bug fix: ByteArrayBuilder incorrectly handles empty strings
Andrei Vasilev [Fri, 21 Jan 2022 18:53:14 +0000 (10:53 -0800)]
HTTPCLIENT-2198, Fixed NPE in TlsConfig.toString()
Replaced called to Arrays.asList() to Arrays.toString(), which allows for null argument.
Andrei Vasilev [Thu, 20 Jan 2022 22:29:38 +0000 (14:29 -0800)]
HTTPCLIENT-2198, Fixed AbstractClientTlsStrategy to respect HttpVersionPolicy
Updated AbstractClientTlsStrategy to pass only the HttpVersionPolicy set by TlsConfig instead of the entire TlsConfig to H2TlsSupport.selectApplicationProtocols() method.
Oleg Kalnichevski [Wed, 12 Jan 2022 10:02:53 +0000 (11:02 +0100)]
HTTPCLIENT-2195, regression: classic ConnectExec incorrectly discards the proxy response body even if the request cannot be executed and the response is final
Arturo Bernal [Tue, 11 Jan 2022 18:00:18 +0000 (19:00 +0100)]
Remove no need it ConnectionConfig.
Arturo Bernal [Tue, 11 Jan 2022 17:53:56 +0000 (18:53 +0100)]
HTTPCLIENT-2188 - Improve logging when BasicHttpClientConnectionManager is still allocated
JasonMathison [Wed, 5 Jan 2022 20:54:46 +0000 (15:54 -0500)]
Httpclient-2194 async retries not including body (#343)
Oleg Kalnichevski [Sun, 26 Dec 2021 11:35:47 +0000 (12:35 +0100)]
Deprecated execute methods that return an open response object in favor of execute methods with a response handler and automatic resource deallocation
Pedro Coelho Torres [Wed, 22 Dec 2021 18:53:43 +0000 (13:53 -0500)]
Bump log4j to 2.17.0
Oleg Kalnichevski [Thu, 16 Dec 2021 19:40:04 +0000 (20:40 +0100)]
Bug fix: Incorrect connection validity check in the async connection manager can cause an IllegalStateException and lead to a connection leak. Treat closed connections as valid due to the connection open check being inherently racy
mxd4 [Wed, 15 Dec 2021 10:04:15 +0000 (11:04 +0100)]
Bump log4j to 2.16.0
Arturo Bernal [Sat, 11 Dec 2021 15:23:12 +0000 (16:23 +0100)]
Method to check if the connection manager has been shut down and is closed or not.
Arturo Bernal [Sat, 11 Dec 2021 16:28:14 +0000 (17:28 +0100)]
Avoid redundant validation of '\"'. Its check it before.
Arturo Bernal [Fri, 10 Dec 2021 22:20:56 +0000 (23:20 +0100)]
Expose method to check the cache is still active.
Arturo Bernal [Fri, 3 Dec 2021 23:23:31 +0000 (00:23 +0100)]
Complete test for HTTP Methods.
Arturo Bernal [Tue, 23 Nov 2021 05:27:33 +0000 (06:27 +0100)]
HTTPCLIENT-2189 - Cookie and Cache APIs to use Java time primitives
Arturo Bernal [Thu, 18 Nov 2021 05:40:38 +0000 (06:40 +0100)]
HTTPCLIENT-2186 - Migrate Test to Unit 5.
Arturo Bernal [Thu, 18 Nov 2021 21:50:21 +0000 (22:50 +0100)]
Convert QOP constants into an enum.
Arturo Bernal [Mon, 1 Nov 2021 08:41:58 +0000 (09:41 +0100)]
HTTPCLIENT-2065: Simplify additon of content type parameters in MultipartEntityBuilder
This closes #320
Arturo Bernal [Sat, 30 Oct 2021 08:49:49 +0000 (10:49 +0200)]
HTTPCLIENT-2066 Provide ByteArrayBody constructors w/o filename parameter
This closes #319
Arturo Bernal [Mon, 1 Nov 2021 16:50:10 +0000 (17:50 +0100)]
HTTPCLIENT-2079: version.properties contains non-interpolated value
This closes #321
Michael Osipov [Sat, 13 Nov 2021 16:09:45 +0000 (17:09 +0100)]
Apply English locale to all date header formatters
Carter Kozak [Fri, 12 Nov 2021 18:39:31 +0000 (13:39 -0500)]
HTTPCLIENT-2184: Fix classic client connection reuse
This fixes an issue in which connections were not returned to the
pool when requests contained non-repeatable bodies AND responses
were streamed. When both of these criteria were met, responses
were returned without ResponseEntityProxy enhancements so that
closing the response entity or stream no longer completed the
exchange, thus leaking the connection which forever lived in the
`leased` state in the connection pool.
Arturo Bernal [Thu, 11 Nov 2021 13:11:24 +0000 (14:11 +0100)]
Fix typo method and class. Deprecate the old ones.
Oleg Kalnichevski [Fri, 12 Nov 2021 21:16:43 +0000 (22:16 +0100)]
Updated examples and unit tests to make use of lambda expressions for response message processing
Oleg Kalnichevski [Mon, 8 Nov 2021 13:21:31 +0000 (14:21 +0100)]
Use Java 8 Time APIs for date / time operations in the HTTP cache tests
Arturo Bernal [Sat, 6 Nov 2021 07:47:14 +0000 (08:47 +0100)]
Add @OverRide.
Arturo Bernal [Sat, 6 Nov 2021 07:13:55 +0000 (08:13 +0100)]
Use {@code } instead <code>.
Oleg Kalnichevski [Mon, 1 Nov 2021 17:04:02 +0000 (18:04 +0100)]
Upgraded HttpClient version to 5.2-alpha2-SNAPSHOT
Oleg Kalnichevski [Fri, 29 Oct 2021 12:55:37 +0000 (14:55 +0200)]
Fixed javadoc errors
Oleg Kalnichevski [Thu, 28 Oct 2021 12:39:17 +0000 (14:39 +0200)]
Updated release notes for HttpClient 5.2-alpha1 release
Arturo Bernal [Sun, 24 Oct 2021 14:42:18 +0000 (16:42 +0200)]
Make IOReactor IO session decorator and exception callback configurable.
Oleg Kalnichevski [Sat, 23 Oct 2021 17:48:00 +0000 (19:48 +0200)]
Replaced SimpleDateFormat and Calendar with Java 8 Time APIs; removed thread-local from DateUtils
Oleg Kalnichevski [Sat, 23 Oct 2021 17:48:00 +0000 (19:48 +0200)]
Updated connection and TLS configuration examples
Oleg Kalnichevski [Sat, 23 Oct 2021 13:57:00 +0000 (15:57 +0200)]
Support for connection TTL setting on a per-route basis
Arturo Bernal [Sat, 23 Oct 2021 07:12:38 +0000 (09:12 +0200)]
Make IOReactor IO session decorator configurable.
Oleg Kalnichevski [Wed, 20 Oct 2021 12:50:45 +0000 (14:50 +0200)]
Upgraded HttpCore to version 5.2-alpha2
Arturo Bernal [Sun, 17 Oct 2021 13:46:36 +0000 (15:46 +0200)]
Change loop that don't loop for "if" conditions.
Arturo Bernal [Sun, 17 Oct 2021 07:40:12 +0000 (09:40 +0200)]
* Fix javadoc typo.
* Use java array declarations instead of "c" way.
Arturo Bernal [Sun, 17 Oct 2021 10:56:38 +0000 (12:56 +0200)]
Re-use core URIScheme instead of String.
Gary Gregory [Wed, 13 Oct 2021 20:04:10 +0000 (16:04 -0400)]
Don't initialize AtomicReference to its default value.
Oleg Kalnichevski [Wed, 13 Oct 2021 09:44:33 +0000 (11:44 +0200)]
HTTPCLIENT-2182: access to SSLSession attributes via reflection disallowed as of Java 16. Core TLS functions now use new Java 1.8 API introduced by 8u251 update
Oleg Kalnichevski [Sun, 12 Sep 2021 12:54:32 +0000 (14:54 +0200)]
HTTPCLIENT-2135: TLS configuration on a per-host basis
Gary Gregory [Mon, 11 Oct 2021 17:21:45 +0000 (13:21 -0400)]
Update Travis builds to LTS versions.
Gary Gregory [Mon, 11 Oct 2021 18:49:16 +0000 (14:49 -0400)]
Use compact array initialization syntax.
Gary Gregory [Mon, 11 Oct 2021 16:10:26 +0000 (12:10 -0400)]
Update some dependencies.
- io.reactivex.rxjava2:rxjava .......................... 2.2.7 -> 2.2.21
- junit:junit ........................................... 4.13 -> 4.13.2
- net.java.dev.jna:jna .................................. 5.2.0 -> 5.9.0
- net.java.dev.jna:jna-platform ......................... 5.2.0 -> 5.9.0
- org.apache.logging.log4j:log4j-core .................. 2.9.1 -> 2.14.1
- org.apache.logging.log4j:log4j-slf4j-impl ............ 2.9.1 -> 2.14.1
- org.conscrypt:conscrypt-openjdk-uber .................. 2.2.1 -> 2.5.2
- org.ehcache.modules:ehcache-api ....................... 3.4.0 -> 3.9.6
- org.mockito:mockito-core ............................. 3.10.0 -> 4.0.0
- JApiCmp ............................................. 0.15.3 -> 0.15.4
Gary Gregory [Mon, 11 Oct 2021 15:41:23 +0000 (11:41 -0400)]
Don't initialize AtomicReference to its default value.
Oleg Kalnichevski [Sun, 26 Sep 2021 13:51:23 +0000 (15:51 +0200)]
Corrected resolution of the target host in DefaultUserTokenHandler
Oleg Kalnichevski [Sun, 26 Sep 2021 09:49:59 +0000 (11:49 +0200)]
RFC 7230: treat presence of a userinfo component in request URI as an HTTP protocol violation
Oleg Kalnichevski [Sun, 26 Sep 2021 09:21:13 +0000 (11:21 +0200)]
AuthCache conformance to RFC 7617
Oleg Kalnichevski [Mon, 27 Sep 2021 12:35:24 +0000 (14:35 +0200)]
Always bind the exchange ID to the execution context
Oleg Kalnichevski [Sat, 25 Sep 2021 16:55:46 +0000 (18:55 +0200)]
Logger cleanup (no functional changes)
Oleg Kalnichevski [Sat, 25 Sep 2021 16:52:51 +0000 (18:52 +0200)]
Refactored AuthCache keeping logic into a separate utility class
Oleg Kalnichevski [Fri, 24 Sep 2021 21:18:02 +0000 (23:18 +0200)]
More consistent handling of request scheme and authority by protocol interceptors
Oleg Kalnichevski [Fri, 24 Sep 2021 14:07:20 +0000 (16:07 +0200)]
Cleanup of authentication test cases
Oleg Kalnichevski [Thu, 23 Sep 2021 10:34:27 +0000 (12:34 +0200)]
Added immutable CredentialsProvider implementations and a CredentialsProvider builder; changed test cases and examples to use immutable CredentialsProvider where possible
Oleg Kalnichevski [Tue, 21 Sep 2021 19:39:51 +0000 (21:39 +0200)]
HTTPCLIENT-2120: force HTTP/1.1 protocol policy when creating a tunnel via HTTP/1.1 proxy
Oleg Kalnichevski [Thu, 16 Sep 2021 15:20:52 +0000 (17:20 +0200)]
Better connect operation logging
Oleg Kalnichevski [Fri, 17 Sep 2021 14:28:18 +0000 (16:28 +0200)]
HTTPCLIENT-2177: fixed incorrect route state tracking by the async connect executor when negotiating a tunnel via a proxy
Oleg Kalnichevski [Fri, 17 Sep 2021 14:23:21 +0000 (16:23 +0200)]
HTTPCLIENT-2177: keep successful tunnel connections alive regardless of `Connection: close`
Oleg Kalnichevski [Mon, 13 Sep 2021 17:15:22 +0000 (19:15 +0200)]
HTTPCLIENT-2045: BASIC auth scheme conformance to RFC 7617
Marcono1234 [Sat, 11 Sep 2021 14:46:03 +0000 (16:46 +0200)]
Fix bad test class name
Oleg Kalnichevski [Fri, 25 Dec 2020 11:34:13 +0000 (12:34 +0100)]
HTTPCLIENT-2120: support for H2 via HTTP/1.1 proxy
Oleg Kalnichevski [Thu, 9 Sep 2021 12:00:20 +0000 (14:00 +0200)]
Upgraded HttpCore to version 5.2-alpha1
Oleg Kalnichevski [Thu, 9 Sep 2021 11:42:12 +0000 (13:42 +0200)]
Fixed deprecation warnings that could be fixed and suppressed those that could not
Arturo Bernal [Fri, 27 Aug 2021 05:06:49 +0000 (07:06 +0200)]
Use setDefaultConnectionConfig instead of deprecated method setValidateAfterInactivity.
Jaikiran Pai [Sun, 22 Aug 2021 13:47:57 +0000 (19:17 +0530)]
Don't retry a request for NoRouteToHostException
Oleg Kalnichevski [Thu, 19 Aug 2021 13:29:39 +0000 (15:29 +0200)]
HTTPCLIENT-2170: Classic protocol layer no longer releases the underlying connection back to the pool prematurely while the NTLM handshake is still ongoing