You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ok2c (via GitHub)" <gi...@apache.org> on 2023/03/14 16:03:25 UTC

[GitHub] [httpcomponents-client] ok2c commented on a diff in pull request #424: Fix issue with duplicate parsing of Cache-Control header

ok2c commented on code in PR #424:
URL: https://github.com/apache/httpcomponents-client/pull/424#discussion_r1135790932


##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheControlHeaderParser.java:
##########
@@ -139,12 +138,20 @@ public final CacheControl parse(final Header header) {
 
         while (!cursor.atEnd()) {
             final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS);
+

Review Comment:
   @arturobernalg Oh, man. This looks ugly. There should be a better way of doing the same.



##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheControlHeaderParser.java:
##########
@@ -85,7 +83,7 @@ class CacheControlHeaderParser {
     /**
      * The set of characters that can delimit a value in the header.
      */
-    private static final BitSet VALUE_DELIMS = Tokenizer.INIT_BITSET(EQUAL_CHAR, ',');
+    private static final BitSet VALUE_DELIMS = Tokenizer.INIT_BITSET(EQUAL_CHAR, ',', SEMICOLON_CHAR);

Review Comment:
   @arturobernalg Why? Why did you put it back? Where is it being used?



-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org