diff --git a/src/main/java/org/opendatakit/aggregate/servlet/FormUploadServlet.java b/src/main/java/org/opendatakit/aggregate/servlet/FormUploadServlet.java index 35aea92471..d59e423020 100644 --- a/src/main/java/org/opendatakit/aggregate/servlet/FormUploadServlet.java +++ b/src/main/java/org/opendatakit/aggregate/servlet/FormUploadServlet.java @@ -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); } diff --git a/src/main/java/org/opendatakit/aggregate/servlet/ResetUsersAndPermissionsServlet.java b/src/main/java/org/opendatakit/aggregate/servlet/ResetUsersAndPermissionsServlet.java index 92d7d353e4..3107550d25 100644 --- a/src/main/java/org/opendatakit/aggregate/servlet/ResetUsersAndPermissionsServlet.java +++ b/src/main/java/org/opendatakit/aggregate/servlet/ResetUsersAndPermissionsServlet.java @@ -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); } diff --git a/src/main/java/org/opendatakit/aggregate/servlet/SubmissionServlet.java b/src/main/java/org/opendatakit/aggregate/servlet/SubmissionServlet.java index dca0c9e6b7..5b572eaca4 100644 --- a/src/main/java/org/opendatakit/aggregate/servlet/SubmissionServlet.java +++ b/src/main/java/org/opendatakit/aggregate/servlet/SubmissionServlet.java @@ -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); }