-
Notifications
You must be signed in to change notification settings - Fork 21
ext_proc: ignore send_body_without_waiting_for_header_response in streamed body modes #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ use crate::body::channel_body::FrameBridge; | |
| use crate::event_error::EventKind; | ||
| use crate::listeners::http_connection_manager::ext_proc::kind; | ||
| use crate::listeners::http_connection_manager::ext_proc::mutation::apply_trailer_mutations; | ||
| use crate::listeners::http_connection_manager::ext_proc::r#override::OverridableBodyMode; | ||
| use crate::listeners::http_connection_manager::ext_proc::r#override::{ | ||
| OverridableGlobalModes, OverridableModeSelector, | ||
| }; | ||
|
|
@@ -49,6 +50,10 @@ use tracing::{debug, warn}; | |
|
|
||
| pub struct RequestProcessing<M: kind::Mode>(Processing<M, kind::RequestMsg>); | ||
|
|
||
| fn is_streamed_body_mode(mode: &OverridableBodyMode) -> bool { | ||
| matches!(mode, OverridableBodyMode::Streamed) | ||
| } | ||
|
|
||
| impl<M: kind::Mode> Deref for RequestProcessing<M> { | ||
| type Target = Processing<M, kind::RequestMsg>; | ||
| fn deref(&self) -> &Self::Target { | ||
|
|
@@ -539,7 +544,11 @@ impl<M: kind::Mode + Default, Msg: kind::MsgKind + OverridableModeSelector> Proc | |
| let send_body_or_trailers = | ||
| override_mode.should_process_body::<Msg>() || override_mode.should_process_trailers::<Msg>(); | ||
|
|
||
| if M::OBSERVABILITY || (self.send_body_without_waiting_for_header_response && send_body_or_trailers) { | ||
| if M::OBSERVABILITY | ||
| || (self.send_body_without_waiting_for_header_response | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i am still not sure if this is going to work as expected,
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @dawid-nowak, thanks for the clarification — that makes sense. You’re right, according to the Envoy documentation the Based on your comment, the correct behavior should be:
I’ll update the logic accordingly and adjust the condition so that Thanks for pointing this out — I’ll push an updated commit shortly. |
||
| && send_body_or_trailers | ||
| && !is_streamed_body_mode(&override_mode.body_mode::<Msg>())) | ||
| { | ||
| self.streaming_body_enabled = true; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.