diff --git a/source/extensions/common/wasm/wasm.cc b/source/extensions/common/wasm/wasm.cc index 3dec54d897..6c8317255d 100644 --- a/source/extensions/common/wasm/wasm.cc +++ b/source/extensions/common/wasm/wasm.cc @@ -1577,6 +1577,10 @@ const StreamInfo::StreamInfo* Context::getConstRequestStreamInfo() const { return &decoder_callbacks_->streamInfo(); } else if (access_log_stream_info_) { return access_log_stream_info_; + } else if (network_read_filter_callbacks_) { + return &network_read_filter_callbacks_->connection().streamInfo(); + } else if (network_write_filter_callbacks_) { + return &network_write_filter_callbacks_->connection().streamInfo(); } return nullptr; } @@ -1586,6 +1590,10 @@ StreamInfo::StreamInfo* Context::getRequestStreamInfo() const { return &encoder_callbacks_->streamInfo(); } else if (decoder_callbacks_) { return &decoder_callbacks_->streamInfo(); + } else if (network_read_filter_callbacks_) { + return &network_read_filter_callbacks_->connection().streamInfo(); + } else if (network_write_filter_callbacks_) { + return &network_write_filter_callbacks_->connection().streamInfo(); } return nullptr; } diff --git a/source/extensions/common/wasm/wasm.h b/source/extensions/common/wasm/wasm.h index 4986e4bfa2..77faf123ee 100644 --- a/source/extensions/common/wasm/wasm.h +++ b/source/extensions/common/wasm/wasm.h @@ -204,7 +204,8 @@ class Context : public Logger::Loggable, // Retrieves the stream info associated with the request (a.k.a active stream). // It selects a value based on the following order: encoder callback, decoder - // callback, log callback. As long as any one of the callbacks is invoked, the value should be + // callback, log callback, network read filter callback, network write filter + // callback. As long as any one of the callbacks is invoked, the value should be // available. const StreamInfo::StreamInfo* getConstRequestStreamInfo() const; StreamInfo::StreamInfo* getRequestStreamInfo() const;