Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Http::FilterHeadersStatus CompressorFilter::encodeHeaders(Http::ResponseHeaderMa
compressor_ = config_->makeCompressor();
} else if (!skip_compression_) {
skip_compression_ = true;
config_->stats().not_compressed_.inc();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this actually gets incremented twice as in the other case skip_compression_ is true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Bah, you are right -- sorry :-(

Quick drive by diff while I was debugging something else. Sorry folks.

}
return Http::FilterHeadersStatus::Continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class CompressorFilterTest : public testing::Test {
EXPECT_EQ(Http::FilterDataStatus::Continue, filter_->encodeData(data_, false));
Http::TestResponseTrailerMapImpl trailers;
EXPECT_EQ(Http::FilterTrailersStatus::Continue, filter_->encodeTrailers(trailers));
EXPECT_EQ(1, stats_.counter("test.test.not_compressed").value());
EXPECT_EQ(0U, stats_.counter("test.test.compressed").value());
Copy link
Member

Choose a reason for hiding this comment

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

Sorry I'm confused. Isn't this still not_compressed?

}

CompressorFilterConfigSharedPtr config_;
Expand Down