-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix Bug : Server sent event get blocked when ModifyResponseBodyGatewayFilterFactory is enable #2774
base: main
Are you sure you want to change the base?
Fix Bug : Server sent event get blocked when ModifyResponseBodyGatewayFilterFactory is enable #2774
Conversation
…yFilterFactory is enable ModifyResponseBodyGatewayFilterFactory is blocker for SSE because it convert Stream response body to Mono.
Hello @spencergibb Could you please have a look to this PR and share you feedbacks. This issue is a show stopper for those who enable Thanks |
Hello @spencergibb Due to below issue, build check was not completed within the given time frame. I am not sure is it due to environment issue at that moment or some other reason. |
Hello @spencergibb , I've seen that the conflicts aren't too big. Is it okay if I check them out and resolve them? |
Go right ahead |
Hello @spencergibb , please have a look, conflicts are resolved. |
Hello @spencergibb , its my bad, I used web view to resolve conflicts and missed one unused import, please retrigger build. I hope this time things goes well 🤞 |
@spencergibb, any update on this PR? |
Hello @spencergibb , Do you have any news on this PR? Are you thinking of classifying it as a bug or a new enhancement? |
Fixes #2775
ModifyResponseBodyGatewayFilterFactory
is blocker for SSE based resources becausewriteWith
method ofModifiedServerHttpResponse
is responsible to modify response body for stream and non stream mime-type,writeWith
convert response body to Mono, this behavior ofwriteWith
is a blocker for stream type SSE.Due to this issue consumer of SSE endpoint getting all events in one go instead of in form of stream. Without ModifyResponseBodyGatewayFilterFactory things works perfectly.
This PR contains fix for this issue and idea is to handle
writeAndFlushWith
method differently for stream mime type, aswriteAndFlushWith
being called by writer only when response content type is of Stream media type.Please review this PR, if looks ok please approve it.