Skip to content

Commit 2529ea6

Browse files
committed
Review feedback
Signed-off-by: Otto van der Schaaf <[email protected]>
1 parent 838f366 commit 2529ea6

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

source/server/http_test_server_filter.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ HttpTestServerDecoderFilter::decodeHeaders(Envoy::Http::RequestHeaderMap& header
4141
config_->computeEffectiveConfiguration(headers);
4242
if (end_stream) {
4343
if (!config_->maybeSendErrorReply(*decoder_callbacks_)) {
44-
const auto effective_config = config_->getEffectiveConfiguration();
44+
const absl::StatusOr<EffectiveFilterConfigurationPtr> effective_config =
45+
config_->getEffectiveConfiguration();
4546
if (effective_config.value()->echo_request_headers()) {
4647
std::stringstream headers_dump;
4748
headers_dump << "\nRequest Headers:\n" << headers;

source/server/http_time_tracking_filter.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ Envoy::Http::FilterDataStatus HttpTimeTrackingFilter::decodeData(Envoy::Buffer::
4747

4848
Envoy::Http::FilterHeadersStatus
4949
HttpTimeTrackingFilter::encodeHeaders(Envoy::Http::ResponseHeaderMap& response_headers, bool) {
50-
const auto effective_config = config_->getEffectiveConfiguration();
50+
const absl::StatusOr<EffectiveFilterConfigurationPtr> effective_config =
51+
config_->getEffectiveConfiguration();
5152
if (effective_config.ok()) {
5253
const std::string previous_request_delta_in_response_header =
5354
effective_config.value()->emit_previous_request_delta_in_response_header();

test/server/http_test_server_filter_integration_test.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
#include "gtest/gtest.h"
1010

1111
namespace Nighthawk {
12+
namespace {
1213

1314
using namespace testing;
1415

15-
const std::string kDefaultProto = R"EOF(
16+
constexpr absl::string_view kDefaultProto = R"EOF(
1617
name: test-server
1718
typed_config:
1819
"@type": type.googleapis.com/nighthawk.server.ResponseOptions
@@ -21,7 +22,7 @@ name: test-server
2122
- { header: { key: "x-supplied-by", value: "nighthawk-test-server"} }
2223
)EOF";
2324

24-
const std::string kNoConfigProto = R"EOF(
25+
constexpr absl::string_view kNoConfigProto = R"EOF(
2526
name: test-server
2627
)EOF";
2728

@@ -248,4 +249,5 @@ TEST(HttpTestServerDecoderFilterTest, HeaderMerge) {
248249
EXPECT_EQ(3, options.response_headers_size());
249250
}
250251

252+
} // namespace
251253
} // namespace Nighthawk

0 commit comments

Comments
 (0)