ishaaaan17 commented on code in PR #13934:
URL: https://github.com/apache/trafficserver/pull/13934#discussion_r4421320744
##########
plugins/regex_remap/regex_remap.cc:
##########
@@ -655,47 +656,45 @@ compile_rule_set(std::string const &filename, std::string
const &source)
}
pos1 = line.find_first_not_of(" \t\n");
- if (pos1 != std::string::npos) {
- if (line[pos1] == '#') {
- continue;
- }
+ if (pos1 == std::string::npos || line[pos1] == '#') {
+ continue;
Review Comment:
[P2] include carriage returns when skipping blank lines
addressed in 6aae1610f. included `\r` in the whitespace search sets (`"
\t\r\n"` and `"\r\n#"`) across all tokenization passes in `compile_rule_set()`.
lines containing only whitespace / carriage returns are now recognized as blank
lines and skipped without rejecting the rule file.
added regression test `test_regex_remap_crlf_blank_lines` in
`test_regex_remap.py` to ensure crlf configurations with blank lines load and
initialize successfully.
--
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]