fix redirection of async endpoints response codes from "202 - Accepted" to "303 - See other"

Bug #1538653 reported by milan k
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Opinion
Wishlist
Unassigned

Bug Description

Currently, there are /v1/controllers/node/ endpoints that both set a location header and a status code 202 - Accepted in the response.
According to the RFC[1][2], this shouldn't be the case unless a resource was created by the original request.
Please correct this to a "303 - See Other"[3] response code or avoid using the location header.

It seems the endpoints affected are (in terms of source code):
ironic/api/controllers/v1/node.py:
 NodeConsoleController.put
 NodeStatesController.power
 NodeStatesController.provision

[1] https://tools.ietf.org/html/rfc7231#section-7.1.2
[2] https://en.wikipedia.org/wiki/HTTP_location
[3] https://en.wikipedia.org/wiki/HTTP_303

Tags: api
Revision history for this message
Dmitry Tantsur (divius) wrote :

That's pretty arguable (as I already mentioned offline), as there seems to be enough places even in RFC's where 202+location are used. Also 202 requires some reference to actual results, which seems a perfect use case for the location header to me. Anyway, pleae feel free to bring this question to a wider discussion on the ML or the team meeting.

Changed in ironic:
importance: Undecided → Wishlist
status: New → Opinion
tags: added: api
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.