JakeChampion commented on code in PR #12505:
URL: https://github.com/apache/trafficserver/pull/12505#discussion_r2362365728
##########
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:
The only way I can get `isspace` to work is to cast it like, otherwise the
compiler can't resolve which version to use - i did this in [`247e887`
(#12505)](https://github.com/apache/trafficserver/pull/12505/commits/247e88757432e09738b5d6046fc50b8ef0000eba)
```
tv.rtrim_if(static_cast<int (*)(int)>(&isspace));
```
--
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]