Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
bianpengyuan committed Aug 3, 2018
1 parent 396e5d9 commit c3a3a84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/envoy/http/mixer/check_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ std::string CheckData::GetUrlPath() const {
if (query_start != nullptr) {
return std::string(path.c_str(), query_start - path.c_str());
}
return std::string(path.c_str(), path.size());
}
return "";
}
Expand Down
12 changes: 7 additions & 5 deletions src/istio/control/http/attributes_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ void AttributesBuilder::ExtractRequestHeaderAttributes(CheckData *check_data) {
builder.AddString(it.name, it.default_value);
}
}

builder.AddString(utils::AttributeName::kRequestUrlPath,
check_data->GetUrlPath());
const auto &query_map = check_data->GetRequestQueries();
if (query_map.size() > 0) {
builder.AddStringMap(utils::AttributeName::kRequestQueries, query_map);
}
}

void AttributesBuilder::ExtractAuthAttributes(CheckData *check_data) {
Expand Down Expand Up @@ -160,11 +167,6 @@ void AttributesBuilder::ExtractCheckAttributes(CheckData *check_data) {
}
}
builder.AddString(utils::AttributeName::kContextProtocol, protocol);

builder.AddStringMap(utils::AttributeName::kRequestQueries,
check_data->GetRequestQueries());
builder.AddString(utils::AttributeName::kRequestUrlPath,
check_data->GetUrlPath());
}

void AttributesBuilder::ForwardAttributes(const Attributes &forward_attributes,
Expand Down

0 comments on commit c3a3a84

Please sign in to comment.