Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #466 from ggalmazor/issue_455_restore_location_hea…
Browse files Browse the repository at this point in the history
…der_in_HEAD_responses

Issue #455 Restore the Location header in HEAD pre-flight responses
  • Loading branch information
lognaturel authored Apr 24, 2019
2 parents 6bd5f5f + e75a671 commit be11e5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
@Override
protected void doHead(HttpServletRequest req, HttpServletResponse resp) {
addOpenRosaHeaders(resp);
// TODO Remove this header when no client relies on it to identify legacy Aggregate servers (v0.9 or older)
resp.setHeader("Location", String.format("%s/%s", ContextFactory.getCallingContext(this, req).getServerURL(), ADDR));
resp.setStatus(204);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws
@Override
protected void doHead(HttpServletRequest req, HttpServletResponse resp) {
addOpenRosaHeaders(resp);
// TODO Remove this header when no client relies on it to identify legacy Aggregate servers (v0.9 or older)
resp.setHeader("Location", String.format("%s/%s", ContextFactory.getCallingContext(this, req).getServerURL(), ADDR));
resp.setStatus(204);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
@Override
protected void doHead(HttpServletRequest req, HttpServletResponse resp) {
addOpenRosaHeaders(resp);
// TODO Remove this header when no client relies on it to identify legacy Aggregate servers (v0.9 or older)
resp.setHeader("Location", String.format("%s/%s", ContextFactory.getCallingContext(this, req).getServerURL(), ADDR));
resp.setStatus(204);
}

Expand Down

0 comments on commit be11e5b

Please sign in to comment.