Commit Graph

300 Commits

Author SHA1 Message Date
Oleg Kalnichevski f6a37780cf Upgraded HttpClient version to 5.3.1-SNAPSHOT 2023-12-06 16:54:47 +01:00
Oleg Kalnichevski 19ab1111c7 More consistent handling of OperationTimeoutException in MemcachedHttpCacheStorage 2023-09-29 15:24:37 +02:00
Oleg Kalnichevski 9d23ddbea7 Upgraded HttpClient version to 5.3-alpha2-SNAPSHOT 2023-08-19 18:39:58 +02:00
Oleg Kalnichevski 83c6079e65 NTLM scheme deprecated and disabled by default 2023-08-12 17:14:53 +02:00
Oleg Kalnichevski c0194331c3 Upgraded project version to 5.3-alpha1-SNAPSHOT 2023-08-12 17:14:16 +02:00
Gary Gregory 09ae5f212a Mostly missing Javadoc in org.apache.hc.client5.http.entity and minor
clean ups
2023-07-02 16:31:07 -04:00
Oleg Kalnichevski 3e38a5e5ec HTTPCLIENT-2271: Do not optimize the path component of the resolved URI by default. 2023-04-27 17:13:53 +02:00
Michael Lee ec5b1f1d60 Hygiene - remove unused private fields 2023-03-13 15:43:31 +01:00
MartinWitt f198fc0e62 Make inner classes static (#405) 2023-03-13 15:43:24 +01:00
Oleg Kalnichevski 22e5a0be6b Upgraded HttpClient version to 5.2.2-SNAPSHOT 2022-12-07 14:09:11 +01:00
Gary Gregory 290ec22022 Fix compiler warnings in tests
Use try-with-resources, also avoids possible leaks on test failures
2022-11-14 22:13:14 +01:00
Gary Gregory 230a2caf67 Replace deprecated use of LangUtils#equals() with Objects.equals() 2022-11-14 09:57:05 -05:00
Oleg Kalnichevski e52ff02f74 Upgraded HttpClient version to 5.2.1-SNAPSHOT 2022-11-13 12:28:46 +01:00
Gary Gregory dca9108352 Use try-with-resources 2022-07-06 10:56:04 -04:00
Gary Gregory 1cd12fc1dc Cleaning up:
- Super interface already implements FutureCallback
- No need to override methods to only call super
- Add missing Javadoc tag
- Access static field directly
2022-07-06 10:13:23 -04:00
jkmcl 15951d8094 Use HTTP header name constants
Use HTTP header name constants instead of string literals.
2022-06-20 19:25:00 +02:00
Oleg Kalnichevski 8dbaf131f5 Upgraded HttpClient version to 5.2-beta2-SNAPSHOT 2022-06-07 14:42:03 +02:00
j3graham 26dcc6f914 HTTPCLIENT-2218: Use Java 8 Base64 utility (#370) 2022-06-01 23:04:29 +02:00
Oleg Kalnichevski b9a6b5ed89 HTTPCLIENT-2202: MemcachedHttpCacheStorage to support MemcachedClientIF interface 2022-02-10 20:33:59 +01:00
Arturo Bernal 4c464b2432 Avoid redundant validation of '\"'. Its check it before. 2021-12-12 20:50:25 +01:00
Arturo Bernal c091c05b72 Expose method to check the cache is still active. 2021-12-11 12:08:17 +01:00
Arturo Bernal d323e0d684 HTTPCLIENT-2189 - Cookie and Cache APIs to use Java time primitives 2021-11-29 14:21:01 +01:00
Arturo Bernal 0a42d173ef HTTPCLIENT-2186 - Migrate Test to Unit 5. 2021-11-21 19:44:13 +01:00
Arturo Bernal 4d0caa4f42 Fix typo method and class. Deprecate the old ones. 2021-11-12 22:16:52 +01:00
Oleg Kalnichevski 3dd37952bc Use Java 8 Time APIs for date / time operations in the HTTP cache tests 2021-11-09 22:50:00 +01:00
Oleg Kalnichevski 1eb2d40df1 Upgraded HttpClient version to 5.2-alpha2-SNAPSHOT 2021-11-01 18:04:02 +01:00
Oleg Kalnichevski dfc2086d24 Replaced SimpleDateFormat and Calendar with Java 8 Time APIs; removed thread-local from DateUtils 2021-10-24 16:50:07 +02:00
Arturo Bernal 277c7228c3 Change loop that don't loop for "if" conditions. 2021-10-23 18:10:15 +02:00
Gary Gregory b6ae693fe5 Don't initialize AtomicReference to its default value. 2021-10-13 10:36:49 +02:00
Oleg Kalnichevski 5390aef223 Always bind the exchange ID to the execution context 2021-09-29 18:01:46 +02:00
Oleg Kalnichevski aff1d2024c Better exception asserts in unit tests 2021-06-19 21:10:43 +02:00
Oleg Kalnichevski 760795b6df HTTPCLIENT-1244: Replaced EasyMock with Mockito in the HTTP cache unit tests 2021-06-19 16:49:12 +02:00
Arturo Bernal d77112f608 Replace assert calls by simpler but equivalent calls. 2021-06-19 16:47:44 +02:00
Arturo Bernal fde3fca687 Simplify conditions and avoid extra checks.
Inline return variables.
2021-06-19 16:47:41 +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 646257e107 Upgraded project version to 5.2-alpha1-SNAPSHOT 2021-05-24 11:30:08 +02:00
Oleg Kalnichevski bb04d078ad Java 1.8 upgrade 2021-05-11 21:34:49 +02:00
Oleg Kalnichevski 6693c186f4 Upgraded HttpClient version to 5.1.1-SNAPSHOT 2021-05-11 21:03:27 +02:00
Oleg Kalnichevski b151df7e8c HTTPCLIENT-2157: response object generated by the classic caching backend is missing the original content encoding 2021-05-01 17:27:12 +02:00
Oleg Kalnichevski 13137eb6c7 Async clients to support scheduled (delayed) re-execution of requests 2021-04-27 12:57:15 +02:00
Arturo Bernal e0c049060b Fix javadoc 2021-03-28 12:36:14 +02:00
Arturo Bernal 879a063b57 Reuse org.apache.hc.core5.http.Method HTTP spec enum 2021-03-16 12:53:31 +01:00
Arturo Bernal 118e7359a1 Fixed typos javadocs and var names 2021-03-14 16:34:18 +01:00
Oleg Kalnichevski 3de88293fe Deprecated message copiers in favor of generic message builders 2021-03-11 22:47:29 +01:00
Arturo Bernal f2e9ad3b11 Fix Typo 2021-02-10 22:09:20 +01:00
Oleg Kalnichevski 744c9d8020 Upgraded HttpClient version to 5.1-beta2-SNAPSHOT 2021-02-10 22:06:51 +01:00
Oleg Kalnichevski f9ea1b6238 Upgraded project version to 5.1-beta1-SNAPSHOT 2021-02-06 13:28:08 +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
Oleg Kalnichevski b71e2fcb83 No need to copy example sources as resources when generating site content 2021-01-17 11:12:33 +01:00
Hervé Boutemy 3b0a7aeee8 improve documentation format 2021-01-12 09:33:48 +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
Gary Gregory 400771a1a7 Add missing @Override. 2020-11-24 09:22:25 -05:00
Gary Gregory b7f851104a Use Arrays.fill(). 2020-11-24 09:22:25 -05:00
Gary Gregory 460abd7474 Use try-with-resources. 2020-11-24 09:22:25 -05:00
Oleg Kalnichevski c9489606d5 HTTPCLIENT-2126: `AsyncCachingExec` throws NPE when response body is null 2020-11-05 15:14:07 +01:00
Oleg Kalnichevski 918ac1535f RFC 3986 conformance: corrected handling of path segments by `URIUtils#normalizeSyntax`; optimized path segment operations 2020-09-27 12:36:29 +02:00
Oleg Kalnichevski 9bc49cc439 Fixed 'JdbcRowSetImpl is internal proprietary API and may be removed in a future release' warning 2020-09-27 12:20:32 +02:00
Oleg Kalnichevski 594e5fcefb Upgraded HttpClient version to 5.0.3-SNAPSHOT 2020-09-27 12:12:59 +02:00
Michael Osipov e249e56c14 Add project modules to dependency management 2020-09-22 09:25:43 +02:00
Michael Osipov e13e4ff548 Unify JXR and Surefire report config 2020-09-22 09:25:43 +02:00
Michael Osipov 37c1a9da1d Unify Javadoc report config 2020-09-22 09:25:43 +02:00
Michael Osipov aec050315e Remove default config 2020-09-22 09:25:43 +02:00
Michael Osipov 4b5a2f44a1 Replace HTTP with HTTPS 2020-09-22 09:25:43 +02:00
dirkhenselin 2520590437 Avoid updating Content-Length header in a 304 response.
I observed the following problem: `Transfer-Encoding` and
`Content-Length` headers should be mutually exclusive and because I use
chunked transfer, the `Transfer-Encoding` header is set in the response
while the `Content-Length` header is not. In case of a 304 during a
revalidation, the header contains Content-Length=0. Probably a proxy is
responsible for this, just like the comment "Some well-known proxies
respond with Content-Length=0, when returning 304" in the method
CachedHttpResponseGenerator::addMissingContentLengthHeader is saying. In
CacheEntryUpdater::mergeHeaders the Content-Length=0 is merged into the
cached entry, but the cached entry contains also a `Transfer-Encoding`
header, so in the cached entry these headers aren't mutually exclusive
anymore. Because of the `Transfer-Encoding` header the method
CachedHttpResponseGenerator::addMissingContentLengthHeader isn't fixing
the `Content-Length` header and Content-Length=0 causes returning null
instead of the cached content. IMHO the `Content-Length` header should
not be merged into the cached response in case of a 304, at least if the
cached entry contains a `Transfer-Encoding` header.
2020-08-18 14:54:36 +02:00
Carter Kozak 9866865357 HTTPCLIENT-2096: Migrate instance loggers to static fields
Note that this may change the origin of logging when classes
have been subclassed, as the logger origin will use the class
name that defined the logger where previously the subclass type
would be used. In scenarios where external libraries subclass
httpclient utilities this allows httpclient logging to maintain
the `org.apache.hc` prefix instead of inheriting arbitrary
subclass names.

Using some logging frameworks this may result in reduced churn
when httpclient components are created (new connections, for example)
because loggers are looked up once per class.
2020-07-09 11:34:48 +02:00
Niels Basjes 9a967de60e Add Automatic-Module-Name in manifest so Java9 modular applications can depend on this library 2020-07-07 15:48:49 +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 c6a4a9b376 Upgraded HttpClient version to 5.0.2-SNAPSHOT 2020-06-12 09:48:10 +02:00
Oleg Kalnichevski 61f3a943e1 Upgraded HttpClient version to 5.0.1-SNAPSHOT 2020-02-22 09:56:16 +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
Oleg Kalnichevski afa8f5ecd1 Upgraded HttpClient version to 5.0-beta8-SNAPSHOT 2020-01-26 12:42:54 +01:00
Michael Osipov 26991b8059 HTTPCLIENT-2036: CacheValidityPolicy should use TimeValue
This closes #201
2020-01-10 11:01:45 +01:00
Ryan Schmitt 3aec96d3db Upgraded HttpCore to version 5.0-beta11 2020-01-07 15:41:18 +01:00
Scott Gifford a8fc99f4a2 HttpByteArrayCacheEntrySerializer minor code cleanup for HTTPCORE-615.
MemcachedCacheEntryHttp inner class NoAgeCacheValidityPolicy should be static.
Add missing javadoc @param and @return entries to MemcachedCacheEntryHttp.
Remove extra blank lines.
2020-01-07 09:30:02 +01:00
Gary Gregory 634886ab61 [HTTPCLIENT-2046] Rename AuthSchemes enum to StandardAuthScheme final class
Modeled after StandardCharsets, the new class indicates a non-exhaustive
list of standard auth schemes by name supported by the HttpClient. The
previous enum suffered from two issues:

* it was exhaustive implying that no more auth schemes can be supported
* its sole purpose was to contain an id for the declared auth scheme;
  the enum values theirselves were never used directly

This closes #196
2020-01-01 21:57:53 +01:00
Scott Gifford f765a81b31 HTTPCORE-615: Implement HTTP-based cache serializer-deserializer. (#192)
HTTPCORE-615: Implement HTTP-based cache serializer-deserializer.
2019-12-30 10:57:58 +01:00
Scott Gifford 40173ca071 Fix bug in ResourceIOException where message was not passed to super. 2019-12-30 10:52:26 +01:00
Michael Osipov 167dbc7576 Make consistent use of AuthSchemes#id
This closes #189
2019-12-27 12:26:34 +01:00
Michael Osipov a5dac4c6f2 HTTPCLIENT-2038: CacheConfig should use TimeValue 2019-12-15 12:45:14 +01:00
Michael Osipov ebccd5d225 Use String#isEmpty() 2019-12-15 11:49:26 +01:00
Michael Osipov 810e56b419 Don't explicitly declare runtime exceptions 2019-12-15 11:36:31 +01:00
Michael Osipov 83bc2c497d ExponentialBackOffSchedulingStrategy should use TimeValue internally 2019-12-15 11:36:31 +01:00
Michael Osipov 846a25561c Use language-agnotic Locale.ROOT 2019-12-15 11:36:30 +01:00
Michael Osipov 3d502c9ac4 Correct Javadoc 2019-12-15 11:28:11 +01:00
Michael Osipov 434d5e5046 Fix formatting 2019-12-15 11:28:11 +01:00
Michael Osipov bca9a873a5 Use consistent variable names 2019-12-15 11:28:08 +01:00
Oleg Kalnichevski a1c63d46df Marked caching async clients as experimental (no functional changes) 2019-12-12 11:02:56 +01:00
Michael Osipov 6cff260eff HTTPCLIENT-2031: Don't use plural names for enums
This closes #180
2019-12-10 10:50:28 +01:00
Olof Larsson e1f48e788d HTTPCLIENT-2023: Allow nested arrays and all primitive types in DefaultHttpCacheEntrySerializer 2019-11-08 10:40:01 +01:00
Oleg Kalnichevski 4d3b3ee2a3 Removed Base64 decoding from TestByteArrayCacheEntrySerializer 2019-10-23 17:24:56 +02:00
Oleg Kalnichevski 25748c48b2 Upgraded HttpClient version to 5.0-beta7-SNAPSHOT 2019-10-09 10:30:55 +02:00
Oleg Kalnichevski a0febeb6f1 Upgraded HttpClient version to 5.0-beta6-SNAPSHOT 2019-07-21 11:22:12 +02:00
Kirill Usov b717fde289 Information response (1xx) processing 2019-07-14 16:11:16 +02:00
Oleg Kalnichevski 669020ccac Renamed Http2 to H2 (no functional changes) 2019-07-14 15:50:44 +02:00
Oleg Kalnichevski 8e42474a6c Deprecated HttpClient functionality now provided out of HttpCore 2019-07-14 15:48:21 +02:00
Gary Gregory 81c1bc4dc3 Clean up. 2019-05-03 10:28:40 -04:00
Oleg Kalnichevski 72d9b378cd Upgraded HttpClient version to 5.0-beta5-SNAPSHOT 2019-04-06 10:36:42 +02:00
Oleg Kalnichevski 3fac3a4435 HttpClient 5.0-beta4 release 2019-04-03 10:41:53 +02:00
Artem Smotrakov adf8691dcd HTTPCLIENT-1976: Unsafe deserialization in DefaultHttpCacheEntrySerializer 2019-04-02 14:07:27 +02:00
Ryan Schmitt f8653a011a Upgrade HttpCore to version 5.0-beta7 2019-02-27 14:36:53 -08:00
Raymond, Jayson e6ca403d29 Some well known proxies respond with Content-Length=0, when returning 304. For robustness, always use the cached entity's content length, as modern browsers do. 2019-02-06 07:21:09 -08:00
Oleg Kalnichevski df4b6d5c80 Upgraded HttpClient version to 5.0-beta4-SNAPSHOT 2018-12-16 11:12:33 +01:00
Oleg Kalnichevski 6a0dc58570 HttpClient 5.0-beta3 release 2018-12-11 10:14:12 +01:00
Oleg Kalnichevski b452006756 Upgraded HttpCore to version 5.0-beta6 2018-12-04 15:49:56 +01:00
Oleg Kalnichevski eb0ee46c05 Upgraded HttpClient version to 5.0-beta3-SNAPSHOT 2018-10-27 10:30:11 +02:00
Oleg Kalnichevski 83f9ab8d1d HttpClient 5.0-beta2 release 2018-10-23 15:40:37 +02:00
Oleg Kalnichevski 1b6175d76a Updated remote javadoc references 2018-10-23 15:14:34 +02:00
Gary Gregory 3e5df337c5 Update tests from Easymock 3.2 to 3.6. 2018-10-22 16:55:19 -06:00
Oleg Kalnichevski ab7be3fd53 Upgraded HttpCore to version 5.0-beta5 2018-10-21 13:24:49 +02:00
Oleg Kalnichevski 37c8006472 Javadocs; renamed some methods (no functional changes) 2018-10-17 23:40:12 +02:00
Gary Gregory 8e486b356e Reuse our UriScheme enum instead of magic strings. 2018-10-03 09:25:17 -06:00
Oleg Kalnichevski cbe00beb56 Removed duplicate class (no functional changes) 2018-08-30 11:36:46 +02:00
Oleg Kalnichevski 1614c25168 Upgraded HttpCore dependency to version 5.0-beta3 2018-08-30 10:54:54 +02:00
Gary Gregory 3aa9c1fd33 - Always use blocks
- Add missing serial version ID (default 1L)
- Camel-case names.
- Don't nest in else clause unnecessarily.
- Remove declared exceptions that are not thrown (but don't break BC.)
- Remove redundant superinterface
- Access static methods directly
- Better local var names.
2018-08-14 20:56:08 +02:00
Gary Gregory 769e9fab3f Add missing @Override annotations. 2018-08-05 11:40:07 -06:00
Gary Gregory c3bdc8913f Refactor common code in a new Closer utility class. 2018-08-04 23:55:41 +02:00
Gary Gregory 8d87cf515b Static methods should be accessed directly. Remove redundant type
arguments. Remove exceptions not thrown from method signatures. Add
missing @Override. Remove unnecessary semicolons. Don't nest
unnecessarily.
2018-08-04 10:40:01 -06:00
Oleg Kalnichevski 68fd176c07 Upgraded HttpClient version to 5.0-beta2-SNAPSHOT 2018-01-18 10:02:04 +01:00
Oleg Kalnichevski 67be267f99 HttpClient 5.0-beta1 release 2018-01-15 13:30:04 +01:00
Sudheera Palihakkara 5f2ad23ab3 HTTPCLIENT-1690: Avoid updating the cache entry with Content-Encoding headers too. (missing piece from last commit). Updated the test case 2018-01-15 13:03:57 +01:00
Sudheera Palihakkara a3bcad3989 HTTPCLIENT-1690: Avoid merging Content-Encoding headers coming with 304 status to cache entry 2018-01-15 10:16:35 +01:00
Oleg Kalnichevski 695f353b43 Re-use concurrent primitives from HttpCore 2018-01-12 14:20:10 +01:00
Oleg Kalnichevski dee32207e3 Upgraded HttpCore dependency to version 5.0-beta2 2018-01-12 14:06:08 +01:00
Oleg Kalnichevski 3780b706ae Fixed cache module dependency declaration 2018-01-11 10:24:56 +01:00
Oleg Kalnichevski eb71f45ee5 SLF4J logging facade 2018-01-10 13:07:37 +01:00
Oleg Kalnichevski 16147b1852 Completed rewrite of re-validation code in the classic caching exec interceptor; added re-validation to the async caching exec interceptor 2018-01-08 11:13:17 +01:00
Oleg Kalnichevski f16ac3ec3b Better method name (no functional changes) 2018-01-07 13:59:28 +01:00
Oleg Kalnichevski 7cf4240b3f Redesigned cache entry re-validation logic; added classic and async implementations of cache re-validators 2018-01-07 12:48:59 +01:00
Oleg Kalnichevski 79b76030fd Replaced FailureCache by generic ConcurrentCountMap 2018-01-05 15:09:05 +01:00
Oleg Kalnichevski 0561bacc66 Decoupled SchedulingStrategy and its implementations from HTTP cache specific logic 2018-01-05 12:29:14 +01:00
Oleg Kalnichevski eb1cab46e6 HTTPCLIENT-1384: clean up of HttpCacheInvalidator and HttpAsyncCacheInvalidator APIs 2018-01-02 13:41:31 +01:00
Oleg Kalnichevski c78032d638 HTTPCLIENT-1395: added config parameter to skip an extra cache entry freshness check upon cache update in case of a cache miss 2018-01-01 18:31:43 +01:00
Oleg Kalnichevski 194e4f5289 Corrected handling of request with non-repeatable by caching request execution interceptors 2018-01-01 16:52:50 +01:00
Oleg Kalnichevski c607197fd0 Code cleanup in AsyncCachingExec: async code made more consistent with that of its classic counterpart and hopefully a bit more readable 2018-01-01 16:45:46 +01:00
Oleg Kalnichevski 77703a7eef HttCache and HttpAsyncCache implementation to treat ResourceIOExceptions as non-fatal and log ResourceIOExceptions as warnings 2017-12-30 12:31:46 +01:00
Oleg Kalnichevski 749b02ac03 HTTPCLIENT-1824: asynchronous HTTP cache executor to use asynchronous HTTP cache APIs; changed algorithm of the backend response freshness check (both classic and async cache implementations) 2017-12-27 11:53:09 +01:00
Oleg Kalnichevski b4768fc86b HTTPCLIENT-1824: asynchronous HTTP response cache 2017-12-27 11:53:03 +01:00
Oleg Kalnichevski 3f52d0bf90 HTTPCLIENT-1824: asynchronous HTTP cache invalidator 2017-12-26 18:12:18 +01:00
Oleg Kalnichevski 6200a17c0c Redesign of CacheKeyGenerator and HttpCacheInvalidator APIs 2017-12-26 18:09:08 +01:00
Oleg Kalnichevski 6459d6882c Added Date util methods for common operations 2017-12-26 17:18:20 +01:00
Oleg Kalnichevski e262842466 Added Cancellable convenience methods 2017-12-23 10:48:46 +01:00
Oleg Kalnichevski d6d3d364eb Clean up of CacheEntryUpdater (CacheEntryUpdater renamed to CacheUpdateHandler) 2017-12-22 15:12:44 +01:00
Oleg Kalnichevski 123a68d513 Clean up of BasicHttpCache and related test classes 2017-12-22 11:10:08 +01:00
Oleg Kalnichevski b2d063c6a8 Removed unused code 2017-12-21 14:49:25 +01:00
Oleg Kalnichevski 8d08c38d4f Bugfix: fixed incorrect behaviour of HttpCacheEntryMatcher, fixed incorrect mapping of cache entries returned by bulk retrieval methods 2017-12-21 14:49:25 +01:00
Oleg Kalnichevski 29666a1ad4 New APIs for cache entry bulk retrieval; bulk retrieval support by Memcached storage implementation 2017-12-20 11:46:57 +01:00