diff --git a/library/common/extensions/filters/http/platform_bridge/c_types.cc b/library/common/extensions/filters/http/platform_bridge/c_types.cc index e437f7b147..b06216bce1 100644 --- a/library/common/extensions/filters/http/platform_bridge/c_types.cc +++ b/library/common/extensions/filters/http/platform_bridge/c_types.cc @@ -3,6 +3,10 @@ #include "envoy/http/filter.h" +const envoy_data envoy_unaltered_data = {0}; + +const envoy_headers envoy_unaltered_headers = {0}; + const envoy_filter_headers_status_t kEnvoyFilterHeadersStatusContinue = static_cast(Envoy::Http::FilterHeadersStatus::Continue); const envoy_filter_headers_status_t kEnvoyFilterHeadersStatusStopIteration = diff --git a/library/common/extensions/filters/http/platform_bridge/c_types.h b/library/common/extensions/filters/http/platform_bridge/c_types.h index a381117c64..734db99d6a 100644 --- a/library/common/extensions/filters/http/platform_bridge/c_types.h +++ b/library/common/extensions/filters/http/platform_bridge/c_types.h @@ -4,6 +4,16 @@ // NOLINT(namespace-envoy) +/** + * Convenience constant indicating no changes to data. + */ +extern const envoy_data envoy_unaltered_data; + +/** + * Convenience constant indicating no changes to headers. + */ +extern const envoy_headers envoy_unaltered_headers; + /** * Return codes for on-headers filter invocations. @see envoy/http/filter.h */ @@ -37,7 +47,7 @@ extern const envoy_filter_data_status_t kEnvoyFilterDataStatusResumeIteration; typedef struct { envoy_filter_data_status_t status; envoy_data data; - envoy_headers extra_headers; + envoy_headers* extra_headers; } envoy_filter_data_status; /** @@ -54,8 +64,8 @@ extern const envoy_filter_trailers_status_t kEnvoyFilterTrailersStatusResumeIter typedef struct { envoy_filter_trailers_status_t status; envoy_headers trailers; - envoy_headers extra_headers; - envoy_data extra_data; + envoy_headers* extra_headers; + envoy_data* extra_data; } envoy_filter_trailers_status; #ifdef __cplusplus