RedirectFilter: User agents are more likely to preserve method on 307.

This commit is contained in:
Gian Merlino 2015-09-25 08:52:19 -07:00
parent 4c72dabce9
commit 906e99d631
1 changed files with 2 additions and 2 deletions

View File

@ -72,12 +72,12 @@ public class RedirectFilter implements Filter
log.debug("Forwarding request to [%s]", url); log.debug("Forwarding request to [%s]", url);
if (url == null) { if (url == null) {
// We apparently have no coordinator, so let's do a Service Unavailable // We apparently have nothing to redirect to, so let's do a Service Unavailable
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE); response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
return; return;
} }
response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY); response.setStatus(HttpServletResponse.SC_TEMPORARY_REDIRECT);
response.setHeader("Location", url.toString()); response.setHeader("Location", url.toString());
} }
} }