Skip to content

Commit

Permalink
Return StopAllIterationAndWatermark in fail_close cases. (#154)
Browse files Browse the repository at this point in the history
in favor of #95, returns StopAllIterationAndWatermark to stop the further body processing in VM failure with fail_close cases.

Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake authored Apr 20, 2021
1 parent 38e6dbd commit 4b33df7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ template <typename P> static uint32_t headerSize(const P &p) { return p ? p->siz

FilterHeadersStatus ContextBase::onRequestHeaders(uint32_t headers, bool end_of_stream) {
CHECK_HTTP2(on_request_headers_abi_01_, on_request_headers_abi_02_, FilterHeadersStatus::Continue,
FilterHeadersStatus::StopIteration);
FilterHeadersStatus::StopAllIterationAndWatermark);
DeferAfterCallActions actions(this);
return convertVmCallResultToFilterHeadersStatus(
wasm_->on_request_headers_abi_01_
Expand Down Expand Up @@ -343,7 +343,7 @@ FilterMetadataStatus ContextBase::onRequestMetadata(uint32_t elements) {

FilterHeadersStatus ContextBase::onResponseHeaders(uint32_t headers, bool end_of_stream) {
CHECK_HTTP2(on_response_headers_abi_01_, on_response_headers_abi_02_,
FilterHeadersStatus::Continue, FilterHeadersStatus::StopIteration);
FilterHeadersStatus::Continue, FilterHeadersStatus::StopAllIterationAndWatermark);
DeferAfterCallActions actions(this);
return convertVmCallResultToFilterHeadersStatus(
wasm_->on_response_headers_abi_01_
Expand Down

0 comments on commit 4b33df7

Please sign in to comment.