Skip to content

Commit

Permalink
Not call report if decodeHeaders is not called. (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwzhang authored Mar 7, 2017
1 parent 6e29abc commit a5567b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/envoy/mixer/http_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ class Instance : public Http::StreamFilter, public Http::AccessLog::Instance {
const HeaderMap* response_headers,
const AccessLog::RequestInfo& request_info) override {
Log().debug("Called Mixer::Instance : {}", __func__);
// If decodeHaeders() is not called, not to call Mixer report.
if (!request_data_) return;
// Make sure not to use any class members at the callback.
// The class may be gone when it is called.
// Log() is a static function so it is OK.
Expand Down

0 comments on commit a5567b9

Please sign in to comment.