Skip to content

Conversation

@kyessenov
Copy link

Per discussion in envoyproxy/envoy#36809

Per discussion in envoyproxy/envoy#36809

Signed-off-by: Kuat Yessenov <kuat@google.com>
[serialized] headers (`serialized_headers_data`,
`serialized_headers_size`).
`serialized_headers_size`). The response is sent after the current
callback completes and triggers response callbacks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the opposite of the intended behavior (which is that proxy_send_local_response() is always a final call).

We want plugins to do something like this:

proxy_on_request_headers() {
   ...
   return proxy_send_local_response(...);
}

and not something like this:

proxy_on_request_headers() {
   ...
   proxy_send_local_response(...);
   do_something_very_important();
   return Pause;
}

The reason this is deferred in Envoy is because the response callbacks (i.e. proxy_on_response_headers() and friends) are called immediately upon sending local response, which leads to re-entrancy problems, but that's another issue (I don't think that plugins should "receive" the local responses they generated themselves).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpwarres I think we have to specify it one way or another. How does WaaS behave here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants