szaszm commented on code in PR #1354:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1354#discussion_r903204296


##########
extensions/http-curl/client/HTTPClient.cpp:
##########
@@ -437,13 +438,13 @@ void HTTPClient::setFollowRedirects(bool follow) {
 }
 
 bool HTTPClient::isValidHttpHeaderField(std::string_view field_name) {
-  if (field_name.size() == 0) {
+  if (field_name.empty()) {
     return false;
   }
 
   // RFC822 3.1.2: The  field-name must be composed of printable ASCII 
characters
   // (i.e., characters that  have  values  between  33.  and  126., decimal, 
except colon).
-  for (auto ch : field_name) {
+  for (auto ch : field_name) {  // NOLINT(readability-use-anyofallof)

Review Comment:
   ```suggestion
     return std::all_of(std::begin(field_name), std::end(field_name), [](char 
c) { return c >= 33 && c <= 126 && c != ':'; });
   ```



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