Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/header_rewrite/header_rewrite_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ class ParserTest : public Parser
bool res;
};

class SimpleTokenizerTest : public SimpleTokenizer
class SimpleTokenizerTest : public HRWSimpleTokenizer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have added a HRW namespace cause prefixes are partying like it's 1999.

{
public:
SimpleTokenizerTest(const std::string &line) : SimpleTokenizer(line), res(true)
SimpleTokenizerTest(const std::string &line) : HRWSimpleTokenizer(line), res(true)
{
std::cout << "Finished tokenizer test: " << line << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/header_rewrite/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Parser::cond_is_hook(TSHttpHookID &hook) const
return false;
}

SimpleTokenizer::SimpleTokenizer(const std::string &original_line)
HRWSimpleTokenizer::HRWSimpleTokenizer(const std::string &original_line)
{
std::string line = original_line;
ParserState state = PARSER_DEFAULT;
Expand Down
8 changes: 4 additions & 4 deletions plugins/header_rewrite/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ class Parser
std::vector<std::string> _tokens;
};

class SimpleTokenizer
class HRWSimpleTokenizer
{
public:
explicit SimpleTokenizer(const std::string &line);
explicit HRWSimpleTokenizer(const std::string &line);

// noncopyable
SimpleTokenizer(const SimpleTokenizer &) = delete;
void operator=(const SimpleTokenizer &) = delete;
HRWSimpleTokenizer(const HRWSimpleTokenizer &) = delete;
void operator=(const HRWSimpleTokenizer &) = delete;

const std::vector<std::string> &
get_tokens() const
Expand Down
2 changes: 1 addition & 1 deletion plugins/header_rewrite/value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Value::set_value(const std::string &val)
_value = val;

if (_value.find("%{") != std::string::npos) {
SimpleTokenizer tokenizer(_value);
HRWSimpleTokenizer tokenizer(_value);
auto tokens = tokenizer.get_tokens();

for (auto token : tokens) {
Expand Down