bneradt commented on code in PR #13107:
URL: https://github.com/apache/trafficserver/pull/13107#discussion_r3114100573


##########
plugins/compress/configuration.cc:
##########
@@ -359,9 +359,11 @@ Configuration::Parse(const char *path)
           c->add_host_configuration(current_host_configuration);
         } else if (token == "supported-algorithms") {
           current_host_configuration->add_compression_algorithms(line_view);
+          line_view.clear();
           state = ParserState::Start;
         } else if (token == "compressible-status-code") {
           current_host_configuration->add_compressible_status_codes(line_view);
+          line_view.clear();
           state = ParserState::Start;

Review Comment:
   I see Copilot's point here, at least in theory. We consume a "token" from 
`line_view` above:
   
   ```cpp
         auto token = extractFirstToken(line_view, isspace);
   ```
   
   Then we process the token, but now with this patch we clear the whole 
line_view. Shouldn't we just consume the token from `line_view`?



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

Reply via email to