Skip to content
Merged
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
11 changes: 7 additions & 4 deletions plugins/header_rewrite/conditions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,15 @@ ConditionUrl::append_value(std::string &s, const Resources &res)
TSDebug(PLUGIN_NAME, " Scheme to match is: %.*s", i, q_str);
break;
case URL_QUAL_URL:
case URL_QUAL_NONE:
q_str = TSUrlStringGet(bufp, url, &i);
s.append(q_str, i);
TSDebug(PLUGIN_NAME, " URL to match is: %.*s", i, q_str);
case URL_QUAL_NONE: {
// TSUrlStringGet returns an allocated char * we must free
char *non_const_q_str = TSUrlStringGet(bufp, url, &i);
s.append(non_const_q_str, i);
TSDebug(PLUGIN_NAME, " URL to match is: %.*s", i, non_const_q_str);
TSfree(non_const_q_str);
break;
}
}
}

bool
Expand Down