Commit Graph

301 Commits

Author SHA1 Message Date
Gary Gregory 1898dffcdb Reuse Function.identity() 2024-10-29 13:16:27 -04:00
Oleg Kalnichevski cc6901798f Bug fix: async cache protocol handler incorrectly updates the actual cache entry in the cache execution context upon cache entry re-validation 2024-10-14 17:58:52 +02:00
Oleg Kalnichevski 81563724d9 Bug fix: response Cache-Control attribute does not get updated in the cache execution context in case of a cache miss 2024-10-14 14:25:39 +02:00
Oleg Kalnichevski 9941fde19e Upgraded HC StyleCheck to version 3; fixed style-check violations (no functional changes) 2024-10-01 11:08:03 +02:00
Oleg Kalnichevski 238e73a73c Upgraded HttpClient version to 5.5-alpha1-SNAPSHOT 2024-10-01 11:07:38 +02:00
Gary Gregory d9a78ce076 Javadoc and reduce boilerplate
- Use final
- package-private methods can throw more precise exception
- Add missing Javadoc comments
- Use lambdas
- Better StringBuilder allocation
- Make private final class a static class
- Make private instance variable final in test
- Single lambda parameter does not need parentheses
- Package-private class constructor can be package-private
2024-09-12 14:47:02 +02:00
Gary Gregory 25f080f307 Private method does not throw checked exception
- Remove it from the private method signatures
- Remove exception handling no longer needed
- Add missing @Override
- No need to nest in an else clause (reduce clutter)
- Use ternary expression
- public methods in a package-private class can be package-private
2024-08-26 11:29:09 -04:00
Gary Gregory 0d6bb65185 ConsumableInputStream extends FilterInputStream
- Reduces boilerplace in the test fixture
- Use Mockito like the rest of the updated test
- Rework test setup to pass on Java 17 and 21 with Mockito
2024-08-24 07:59:29 -04:00
Gary Gregory 75aabd7f62 Javadoc improvements
- No need to use a FQCN when the name is already importted
- Import type instead of using a FQCN
- Use camel-case in paramerter name
- Add missing Javadoc
- Add some missing return tags
- Close some HTML tags
- Fix some comments
- Update Javadoc links
2024-08-17 11:20:08 -04:00
Oleg Kalnichevski 4009567af7 Remove @Experimental from async cache classes 2024-08-11 11:13:03 +02:00
strangelookingnerd cc13243cd3 Minor code cleanup 2024-06-27 23:11:05 +02:00
strangelookingnerd 420910da4f Fix assertions 2024-06-27 23:11:05 +02:00
strangelookingnerd 185d4e32aa Test classes and methods should have default package visibility 2024-06-27 23:11:05 +02:00
Oleg Kalnichevski e45345876e Use CompletedFuture from core 2024-06-27 09:54:40 +02:00
Oleg Kalnichevski a0bf57b837 Upgraded HttpClient version to 5.4-beta2-SNAPSHOT 2024-06-26 14:15:11 +02:00
Gary Gregory 225edf5ea8 Javadoc singleton versus default instances 2024-06-10 18:21:36 -04:00
jattisha 0f37ebdc7d
HTTPCLIENT-2327: Propagate CancellationExceptions from MemcachedClient operations as ResourceIOExceptions (#559) 2024-05-16 15:31:22 +02:00
Oleg Kalnichevski ccfb674a1e Upgraded HttpClient version to 5.4-alpha3-SNAPSHOT 2024-03-11 09:39:26 +01:00
Oleg Kalnichevski eb6fd6b1c2 HttpClientContext and HttpCacheContext to use instance variables for standard attributes 2024-02-29 17:12:35 +01:00
Oleg Kalnichevski 762b18fe69 HttpClientContext to use instance variables for standard attributes 2024-02-29 17:12:35 +01:00
Oleg Kalnichevski 8a7f707a61 Upgraded HttpCore to version 5.3-alpha2 2024-02-14 15:41:56 +01:00
Michael Lee 661589e386 Removed unused private fields and local variables 2024-02-10 14:18:04 +01:00
Oleg Kalnichevski f4f5f73be2 FileResourceFactory to generate stable file names for the same request Id and entity tag 2024-01-26 09:15:21 +01:00
Oleg Kalnichevski d787637e6e Cache ResourceFactory to make use of strong eTags when available 2024-01-26 09:15:21 +01:00
Oleg Kalnichevski 5ecd396f60 Deprecated #copy method in FileResourceFactory 2024-01-26 09:15:21 +01:00
Oleg Kalnichevski a1e8e9082e Better ETag handling 2024-01-18 20:08:39 +01:00
Oleg Kalnichevski d7108f60ae Added #toString methods to Resource implementations 2024-01-12 09:23:42 +01:00
Oleg Kalnichevski 7c0d083b12 Cache control and context API 2024-01-12 09:23:42 +01:00
Oleg Kalnichevski 364fa60cd3 Promote RequestCacheControl and ResponseCacheControl to public API 2024-01-12 09:23:42 +01:00
Oleg Kalnichevski aad5987246 Corrected version in @since 2024-01-06 15:25:58 +01:00
Oleg Kalnichevski f24c8010bb Made caching of 403 responses by the classic and async protocol handlers more consistent 2024-01-03 11:29:16 +01:00
Oleg Kalnichevski c5de6961d1 Upgraded HttpClient version to 5.4-alpha2-SNAPSHOT 2023-12-29 10:47:10 +01:00
Oleg Kalnichevski c3d99b130c Do not set the default HTTP version of cache response messages 2023-12-24 17:54:03 +01:00
Oleg Kalnichevski 6a497be400 Bug-fix: HTTP cache to use response Cache-Control `s-maxage` attribute only when configured as shared 2023-12-24 17:08:04 +01:00
Oleg Kalnichevski df090e4228 Use core MessageSupport methods instead of internal ones 2023-12-23 13:25:59 +01:00
Oleg Kalnichevski 4dc82b40f6 Removed references to deprecated functions 2023-12-23 13:16:25 +01:00
Oleg Kalnichevski 1bbf5f4371 Bug fix: when validating a cache entry the protocol handlers must use the current request message with additional headers generated by the previous request interceptors instead of the original request message 2023-12-13 11:54:48 +01:00
Oleg Kalnichevski 67a0b52919 Better debug logging in the caching protocol handlers 2023-12-13 11:54:48 +01:00
Oleg Kalnichevski 628a963a3a Better HTTP execution context management by caching protocol handlers 2023-12-13 11:54:48 +01:00
Oleg Kalnichevski abb958ec27 HTTPCLIENT-2277: Revised cache validation logic for conformance with the specification requirements per RFC 9111 section 4 2023-12-13 11:54:47 +01:00
Oleg Kalnichevski ebae9ef7e3 HTTPCLIENT-2277: Aligned CachedResponseSuitabilityChecker with the specification requirements per RFC 9111 section 4 2023-12-13 11:54:47 +01:00
Oleg Kalnichevski 99eb13934f HTTPCLIENT-2277: Aligned ResponseCachingPolicy with the specification requirements per RFC 9111 section 3 2023-12-13 11:54:47 +01:00
Oleg Kalnichevski fcb86dae11 HTTPCLIENT-2277: Do not store AUTHORIZATION request header in the cache entry per RFC 9111 section 3.5 2023-12-13 11:54:47 +01:00
Oleg Kalnichevski 1492f57a84 HTTPCLIENT-2277: Cache update bug fix 2023-12-13 11:54:47 +01:00
Oleg Kalnichevski 17540a7881 Moved methods used by the public API classes from CacheSupport to CacheKeyGenerator; added test cases 2023-12-13 11:54:46 +01:00
Oleg Kalnichevski 3ff5496ffb HttpCacheEntry to cache parsed DATE, EXPIRES and LAST_MODIFIED values; avoid parsing DATE header of cache entries and HTTP messages multiple times 2023-12-13 11:54:46 +01:00
Oleg Kalnichevski e7ee13701e Optimize `#isResponseCacheable` by parsing DATE and EXPIRES headers only once 2023-12-13 11:54:46 +01:00
Oleg Kalnichevski 762028805e Moved delta-second parsing routine to CacheSupport 2023-12-13 11:54:46 +01:00
Oleg Kalnichevski 6055776245 Fixed invalid flow control in CacheControlHeaderParser 2023-12-13 11:54:46 +01:00
Oleg Kalnichevski 152ba4736f Renamed cache protocol conformance response interceptor (no functional changes) 2023-12-13 11:54:45 +01:00