Skip to content

Commit

Permalink
Fix missing location in TPS profile POST answer
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarco76 committed Aug 27, 2024
1 parent 0d5eccb commit d5502a4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit d5502a4

Please sign in to comment.