120 Commits

Author SHA1 Message Date
Gary Gregory
f78ec699ab Camel case names 2023-03-13 15:43:16 +01:00
Oleg Kalnichevski
cb80c3cc50 Disabled a test case that fails intermittently with GitHub Actions. 2022-11-26 10:54:05 +01:00
Oleg Kalnichevski
fe1e095ef9 Regression: connection managers fail to take into account per route connection config when closing expired connections 2022-11-06 11:11:53 +01:00
Oleg Kalnichevski
7626230ffd Fixed integration tests broken by JUnit 5 upgrade 2022-11-05 11:16:05 +01:00
Gary Gregory
c6f83a579d Be more lenient on slower build machines 2022-10-02 16:46:07 +02:00
Carter Kozak
3bd017cb0a 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.
2022-06-11 14:11:06 +02:00
Oleg Kalnichevski
9e0ff508e8 Upgraded HttpCore to version 5.2-beta2 2022-06-01 23:04:39 +02:00
j3graham
26dcc6f914 HTTPCLIENT-2218: Use Java 8 Base64 utility (#370) 2022-06-01 23:04:29 +02:00
Oleg Kalnichevski
62fb4bcbe0 HTTPCLIENT-2212: MinimalHttpAsyncClient fails to release client endpoints in case of a connect error (such as TLS handshake failure) 2022-05-05 10:47:27 +02:00
Oleg Kalnichevski
f00ce5da9e HTTPCLIENT-2200: Protocol interceptors are executed before the connection route has been fully established 2022-03-17 17:43:22 +01:00
Oleg Kalnichevski
e6ad081b3c Deprecated execute methods that return an open response object in favor of execute methods with a response handler and automatic resource deallocation 2021-12-26 17:02:55 +01:00
Arturo Bernal
0a42d173ef HTTPCLIENT-2186 - Migrate Test to Unit 5. 2021-11-21 19:44:13 +01:00
Carter Kozak
e09c5d0691 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.
2021-11-12 17:33:59 -05:00
Oleg Kalnichevski
0e8adf79dc Updated examples and unit tests to make use of lambda expressions for response message processing 2021-11-12 22:16:43 +01:00
Oleg Kalnichevski
b10d43f2bb HTTPCLIENT-2135: TLS configuration on a per-host basis 2021-10-23 18:07:41 +02:00
Gary Gregory
b6ae693fe5 Don't initialize AtomicReference to its default value. 2021-10-13 10:36:49 +02:00
Oleg Kalnichevski
fb0c073783 RFC 7230: treat presence of a userinfo component in request URI as an HTTP protocol violation 2021-09-29 18:01:46 +02:00
Oleg Kalnichevski
30c253b37b AuthCache conformance to RFC 7617 2021-09-29 18:01:46 +02:00
Oleg Kalnichevski
88a05247e1 Cleanup of authentication test cases 2021-09-29 18:01:46 +02:00
Oleg Kalnichevski
7b47b28d46 Added immutable CredentialsProvider implementations and a CredentialsProvider builder; changed test cases and examples to use immutable CredentialsProvider where possible 2021-09-29 18:01:45 +02:00
Oleg Kalnichevski
17ebfc529e HTTPCLIENT-2120: force HTTP/1.1 protocol policy when creating a tunnel via HTTP/1.1 proxy 2021-09-29 18:01:43 +02:00
Oleg Kalnichevski
92f757eee3 HTTPCLIENT-2120: support for H2 via HTTP/1.1 proxy 2021-09-09 14:58:49 +02:00
Oleg Kalnichevski
c56c00c549 Fixed deprecation warnings that could be fixed and suppressed those that could not 2021-09-09 13:49:44 +02:00
Oleg Kalnichevski
29ba623ebe Fixed connection lease request cancellation race in both classic and asyc pooling connection managers 2021-06-28 22:27:01 +02:00
Oleg Kalnichevski
aff1d2024c Better exception asserts in unit tests 2021-06-19 21:10:43 +02:00
Oleg Kalnichevski
0805cfe582 Updated test cases with exception asserts 2021-05-24 18:53:58 +02:00
Oleg Kalnichevski
82432f50d9 Removed references to deprecated Assert#assertThat 2021-05-24 16:58:33 +02:00
Oleg Kalnichevski
8580d7fddf Redundant type declarations 2021-05-24 14:43:18 +02:00
Oleg Kalnichevski
f36637dc2f Moved connection management related settings from RequestConfig to new class ConnectionMgmtConfig 2021-05-24 12:43:41 +02:00
Oleg Kalnichevski
bb04d078ad Java 1.8 upgrade 2021-05-11 21:34:49 +02:00
Oleg Kalnichevski
09f50cd80c HTTPCLIENT-2152: Fixed handling of unexpected unchecked exception by the async request retry exec interceptor 2021-04-27 13:07:13 +02:00
Oleg Kalnichevski
2404540f1f Deprecated request factory classes in favor of request builders 2021-03-14 22:13:55 +01:00
Oleg Kalnichevski
1174c240e2 Simple message builders 2021-03-14 18:59:22 +01:00
Oleg Kalnichevski
4b295dff15 Deprecated some URIUtils methods in favor of URIBuilder 2021-02-06 18:05:01 +01:00
Arturo Bernal
0940d35602 Minor Improvement:
* Avoid duplicate code
* Simplify if else
* Inline variables
2021-02-05 22:18:45 +01:00
Arturo Bernal
3c9f1f85e1 Minor Improvements:
* Use Empty collections
* Unnecessary toString
2021-01-26 09:14:46 +01:00
Arturo Bernal
6a02e818ff Minor Improvements:
* Remove redundant initialization
2021-01-05 20:01:19 +01:00
Arturo Bernal
36e1bde6ff Minor Improvements:
* Add final to variable
* Unnecessary semicolon
* Use Standard Charset object
* Unnecessary conversion to String
* Simplifiable conditional expression
* Replace 'Arrays.asList()' with Collections.singletonList
* Redundant local variable. Simplify
2020-12-31 13:50:06 +01:00
Oleg Kalnichevski
871ee6bde7 External compatibility tests to use HTTP protocol negotiation settings 2020-11-29 14:33:32 +01:00
Gary Gregory
400771a1a7 Add missing @Override. 2020-11-24 09:22:25 -05:00
Gary Gregory
65c6c25070 [HTTPCLIENT-2124] NullPointerException in MinimalHttpClient.doExecute(HttpHost, ClassicHttpRequest, HttpContext) (#261) 2020-10-25 23:11:14 +01:00
Oleg Kalnichevski
f6da2bac6f HTTPCLIENT-2105: async clients incorrectly handle redirects of requests with enclosed entity 2020-08-09 22:48:30 +02:00
Carter Kozak
84bd290954
HTTPCLIENT-2095: Use slf4j interpolation instead of string concatenation where possible (#232) 2020-07-02 17:51:43 +02:00
Oleg Kalnichevski
98daeabc05 HTTPCLIENT-2061: corrected sequence of request execution interceptors in classic HttpClient 2020-03-17 14:51:19 +01:00
Oleg Kalnichevski
1928f8db40 Rewrite of redirect integration test cases 2020-03-17 14:47:46 +01:00
Gary Gregory
d1c4199db3
No need to use the type name of an input arg in the method name. (#208)
* No need to use the type name of an input arg in the method name.

* Do not use input type names in method names.
2020-01-29 19:20:05 -05:00
Michael Osipov
38a41fea90 Use camelCase for Java method names -- always 2020-01-19 20:25:04 +01:00
Michael Osipov
5a8a6d0fc8 Convert convenience builders form enums to final classes
Turn exhaustive enum builder pattern to a final class with builder
methods serving HTTP request objects.

This closes #202
2020-01-19 20:23:33 +01:00
Ryan Schmitt
82a9932446 Add reactive test coverage
This commit adds test coverage for the `:httpcore5-reactive` bindings,
using different types of clients and protocols.
2020-01-07 11:04:14 -08:00
Ryan Schmitt
3aec96d3db Upgraded HttpCore to version 5.0-beta11 2020-01-07 15:41:18 +01:00