Skip to content

Commit

Permalink
revert attributes_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarjog committed Jan 29, 2019
1 parent 1e65f94 commit f75ebb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/istio/control/http/attributes_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "src/istio/control/http/attributes_builder.h"

#include <set>

#include "include/istio/utils/attribute_names.h"
#include "include/istio/utils/attributes_builder.h"
#include "include/istio/utils/status.h"
Expand Down Expand Up @@ -130,8 +131,7 @@ void AttributesBuilder::ExtractForwardedAttributes(CheckData *check_data) {
return;
}
Attributes v2_format;
auto ok = v2_format.ParseFromString(forwarded_data);
if (ok) {
if (v2_format.ParseFromString(forwarded_data)) {
request_->attributes->MergeFrom(v2_format);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/istio/control/http/request_handler_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ CancelFunc RequestHandlerImpl::Check(CheckData* check_data,
HeaderUpdate* header_update,
TransportCheckFunc transport,
CheckDoneFunc on_done) {
service_context_->InjectForwardedAttributes(header_update);
// Forwarded attributes need to be stored regardless Check is needed
// or not since the header will be updated or removed.
AddCheckAttributes(check_data);
AddForwardAttributes(check_data);
header_update->RemoveIstioAttributes();
service_context_->InjectForwardedAttributes(header_update);

if (!service_context_->enable_mixer_check()) {
CheckResponseInfo check_response_info;
Expand Down

0 comments on commit f75ebb2

Please sign in to comment.