Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

addHeader may cause error #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

addHeader may cause error #15

wants to merge 3 commits into from

Conversation

liumapp
Copy link

@liumapp liumapp commented Nov 18, 2017

in some times , filter may do it's job several times .

which will cause error like this :

1.jpg

use setheader instead of add , will solve this problem

@mohitsoni
Copy link
Contributor

@liumapp Interesting situation.

I'm curious to understand how we got into this particular situation. Is it because:

  1. CORSFilter got invoked multiple times in one request/response cycle ?
    1.1 Is this because CORSFilter is configured multiple times in the filter chain ?
  2. There's another filter in your filter chain that duplicates the CORSFilter functionality ?

The change seems fine to me, but I would like to understand the context better.

@liumapp
Copy link
Author

liumapp commented Jan 16, 2018

We have configured two filters, but we make sure the CORS's filter are executed first.

The initial guess may be related to Shiro.

But my amendment can solve this problem .

I hope you are willing to accept my pull request

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants