Skip to content

Commit

Permalink
pac4j expects to replace in setResponseHeader
Browse files Browse the repository at this point in the history
This fixes a bug with central logout where the location header
was set twice for example.
  • Loading branch information
victornoel committed Aug 28, 2017
1 parent 07a312e commit 0848a59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/pac4j/jax/rs/pac4j/JaxRsContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public void setResponseStatus(int code) {

@Override
public void setResponseHeader(String name, String value) {
// header() adds headers, so we must remove the previous value first
getAbortBuilder().header(name, null);
getAbortBuilder().header(name, value);
}

Expand Down

0 comments on commit 0848a59

Please sign in to comment.