ok2c commented on a change in pull request #314:
URL: 
https://github.com/apache/httpcomponents-client/pull/314#discussion_r730391432



##########
File path: 
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java
##########
@@ -302,7 +302,7 @@ private boolean 
expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl(final Http
 
     private boolean from1_0Origin(final HttpResponse response) {
         final Iterator<HeaderElement> it = MessageSupport.iterate(response, 
HeaderConstants.VIA);
-        while (it.hasNext()) {
+        if (it.hasNext()) {

Review comment:
       > because it doesn't iterate. in the best case it returns the protocol
   @arturobernalg This is true but is it really worth it?




-- 
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]

Reply via email to