jbuilder
jbuilder copied to clipboard
Template for update action incorrectly includes location header
Commit 9dbce9c1 changed the template for the update action, adding a location header to the response. That's not correct behavior. The default Rails template, for example, does not include such header.
Also, RFC2616 defines it as redirect instruction, so it's not applicable to 200 responses:
The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource.