Open
Conversation
Per discussion in envoyproxy/envoy#36809 Signed-off-by: Kuat Yessenov <kuat@google.com>
3fa4096 to
19d9be3
Compare
PiotrSikora
reviewed
Nov 7, 2024
| [serialized] headers (`serialized_headers_data`, | ||
| `serialized_headers_size`). | ||
| `serialized_headers_size`). The response is sent after the current | ||
| callback completes and triggers response callbacks. |
Member
There was a problem hiding this comment.
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).
Author
There was a problem hiding this comment.
@mpwarres I think we have to specify it one way or another. How does WaaS behave here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per discussion in envoyproxy/envoy#36809