Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.
Merged
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
8 changes: 8 additions & 0 deletions source/extensions/common/wasm/wasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion source/extensions/common/wasm/wasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ class Context : public Logger::Loggable<Logger::Id::wasm>,

// 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;
Expand Down