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


##########
plugins/compress/configuration.cc:
##########
@@ -190,6 +191,18 @@ HostConfiguration::is_status_code_compressible(const 
TSHttpStatus status_code) c
   return it != compressible_status_codes_.end();
 }
 
+static std::string_view
+strip_params(std::string_view v)
+{
+  if (auto pos = v.find(';'); pos != std::string_view::npos) {
+    v = v.substr(0, pos);
+  }
+  // trim trailing spaces
+  while (!v.empty() && isspace(static_cast<unsigned char>(v.back())))
+    v.remove_suffix(1);
+  return v;

Review Comment:
   We should be able to get isspace to work. It would be nice to avoid the list 
of characters. We use it in other plugins, like here:
   
   
https://github.com/apache/trafficserver/blob/2128398aa01cc624da4acbe1a3153cc5da35cfb8/plugins/header_rewrite/matcher.h#L210
   
   And here:
   
https://github.com/apache/trafficserver/blob/2128398aa01cc624da4acbe1a3153cc5da35cfb8/plugins/origin_server_auth/origin_server_auth.cc#L623
   
   Trying to be helpful: did you include `#include <cctype>` ?



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