mirror of https://github.com/apache/druid.git
RedirectFilter: User agents are more likely to preserve method on 307.
This commit is contained in:
parent
4c72dabce9
commit
906e99d631
|
@ -72,12 +72,12 @@ public class RedirectFilter implements Filter
|
|||
log.debug("Forwarding request to [%s]", url);
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
|
||||
response.setStatus(HttpServletResponse.SC_TEMPORARY_REDIRECT);
|
||||
response.setHeader("Location", url.toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue