-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add StaticHeadersWriter.setIgnoreIfContainsHeader(boolean) #6478
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
Comments
@rwinch I would like to take this one. |
Hi @ankurpathak, I think the changes you've made in #6456 for
I would like the static header to be skipped if it already exists in the response. But with this code, it would be added, not skipped. Thanks for helping. |
@mickaeltr We can modify method something like this to acheive:
Changed in #6456 as well. |
@ankurpathak In my case, I think that still would not work I would like my static I would like to override it, for example with: With your implementation, I understand that I would get So I am more in favor of an |
@mickaeltr This will cover your case I think.
Changed in #6456 as well. |
Yes that would work for me. 👍 |
Issue for which I have submitted PR yet to be reviewed. The issue itself is about checking header existence before writing them. I will be able to comment on backward compatabilty only after that. But in current state its not breaking any existing tests. |
@ankurpathak Thanks for pointing that out. You are right this is a duplicate. @mickaeltr You are right to worry about passivity. We will move that discussion to the existing tickets though |
Summary
We should add a property to StaticHeadersWriter that indicates it should skip adding a header if the header already exists.
The text was updated successfully, but these errors were encountered: