From d5502a4969d68c397d389517fa0caf1d25729e0f Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Mon, 26 Aug 2024 16:44:25 +0200 Subject: [PATCH] Fix missing location in TPS profile POST answer --- .../java/org/dogtagpki/server/tps/rest/v2/TPSProfileServlet.java | 1 + 1 file changed, 1 insertion(+) diff --git a/base/tps/src/main/java/org/dogtagpki/server/tps/rest/v2/TPSProfileServlet.java b/base/tps/src/main/java/org/dogtagpki/server/tps/rest/v2/TPSProfileServlet.java index 54ccf381b08..effa9b39725 100644 --- a/base/tps/src/main/java/org/dogtagpki/server/tps/rest/v2/TPSProfileServlet.java +++ b/base/tps/src/main/java/org/dogtagpki/server/tps/rest/v2/TPSProfileServlet.java @@ -64,6 +64,7 @@ public void addProfile(HttpServletRequest request, HttpServletResponse response) String encodedID = URLEncoder.encode(newProfile.getID(), "UTF-8"); StringBuffer uri = request.getRequestURL(); uri.append("/" + encodedID); + response.setHeader("Location", uri.toString()); response.setStatus(HttpServletResponse.SC_CREATED); PrintWriter out = response.getWriter(); out.println(newProfile.toJSON());