arturobernalg commented on code in PR #850:
URL:
https://github.com/apache/httpcomponents-client/pull/850#discussion_r3590136221
##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java:
##########
@@ -302,7 +302,7 @@ public void completed(final CacheMatch result) {
final CacheHit root = result != null ? result.root : null;
if (hit == null) {
if (requestCollapsingEnabled && root == null &&
!requestCacheControl.isOnlyIfCached()) {
- final String cacheKey =
CacheKeyGenerator.INSTANCE.generateKey(target, cacheRequest);
+ final String cacheKey =
CacheKeyGenerator.INSTANCE.generateKey(target, cacheRequest,
SimpleHttpRequest::getBodyText);
Review Comment:
That still does not require String. A request implementation could
canonicalize the content and return the resulting bytes. That preserves the
option for content-type-specific normalization without forcing arbitrary
content through text decoding.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]