-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Question: AbstractProxyServlet onServerResponseHeaders addHeader rather than setHeader #577
Comments
@sbordet old jetty-client API question. |
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to it having no activity. |
This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has been a |
This issue has been automatically marked as stale because it has been a |
This issue has been automatically marked as stale because it has been a |
We have a listener
implmenets org.eclipse.jetty.client.api.Response.Listener
classand for
onHeaders
method we have the following implementationthis
wrappedVersion.onHeaders
callsProxyResponseListener
then callsAbstractProxyServlet's onServerResponseHeaders
method which callsaddHeader
.This is a problem for us because we have configured
org.eclipse.jetty.servlets.CrossOriginFilter
which hashandleSimpleResponse
which callsresponse.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, origin);
And this CORS filter is called before our filter. Which means for our filter
onHeaders
, rather than replacing the headers, it actually added more headers.I wonder why Jetty doesn't do
setHeader
inonServerResponseHeaders
? I am guessing this is because we do not want to lose any set cookie headers?And what would be a better design if its something we can improve on our side?
thanks
The text was updated successfully, but these errors were encountered: