-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make sure quarkus.http.filter
headers don't remove existing headers
#38185
Conversation
This comment has been minimized.
This comment has been minimized.
...tp/runtime/src/main/java/io/quarkus/vertx/http/runtime/options/HttpServerCommonHandlers.java
Outdated
Show resolved
Hide resolved
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.
We need to verify how duplicates are handled.
Also, it needs to be marked as a breaking change.
The previous behavior would completely replace existing response headers Fixes: quarkusio#38155
PR updated with an improved test showing all cases. It will no longer duplicate values |
quarkus.http.filter
headers don't remove existing headers
} else { | ||
// we don't need to do anything here as the value was already in the set |
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.
Remove the unnecessary else
block then?
} else { | |
// we don't need to do anything here as the value was already in the set | |
} else { | |
// we don't need to do anything here as the value was already in the set |
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.
I wanted to keep it because of the comment
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.
I see, but it seems to be explicit in your code already and the IDE nags about empty else blocks 😜
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.
I generally disable that inspection 😉
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. You can consult the Develocity build scans. |
@gsmet it might make sense to backport this? |
It's a breaking change, so best not to |
The previous behavior would completely replace
existing response headers
Fixes: #38155