-
Notifications
You must be signed in to change notification settings - Fork 536
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 message headers that weren't set in the http response headers. #2564
base: master
Are you sure you want to change the base?
Conversation
d75a6bb
to
3c40c94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reporting this @luankevinferreira
Indeed, multi-value headers should be supported, can you add a test for it?
Nevertheless, I'm not convinced response message headers should be copied to the http response, because they can be defined in the ServiceResponse
object.
The problem with See: https://vertx.io/docs/vertx-core/java/#_types_of_messages |
3c40c94
to
abc7721
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the updates
That's right, thank you for spotting this. Then I think that we should store headers in the service response in the form of an array of json objects like this: {
"headers": [
{ "header1": "value1"},
{ "header1": "value2"},
{ "header2": "value3"},
]
} And for backward compatibility, perhaps we can have a sysprop that switches between the old and the new format |
Motivation:
Messages sent over the event bus can also contain headers. This can be specified by providing a DeliveryOptions when sending or publishing.
The following changes aim to fix the following problems in this flow:
DeliveryOptions
headers are not being set in the HTTP responses for message replies;Set-Cookie
) are not being set in the HTTP responses because it's not retrieving all the key values from theMultiMap
;