mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Changed response on /minions from 302 to 202
Arguably this is a more appropriate response code. In addition, the original intent with the 302 was to supply the job ID in order to be able to reference it later, however 3XX responses are not available via the XHR object in browsers nor do they communicate intent.
This commit is contained in:
parent
a7a8b9787d
commit
ab396c358a
@ -485,7 +485,11 @@ class Minions(LowDataAdapter):
|
||||
for chunk in cherrypy.request.lowstate:
|
||||
chunk['client'] = 'local_async'
|
||||
job_data = next(self.exec_lowstate(), {})
|
||||
raise cherrypy.HTTPRedirect('/jobs/{jid}'.format(**job_data), 302)
|
||||
|
||||
cherrypy.response.status = 202
|
||||
return [{
|
||||
'return': job_data,
|
||||
}]
|
||||
|
||||
class Jobs(LowDataAdapter):
|
||||
def GET(self, jid=None):
|
||||
|
Loading…
Reference in New Issue
Block a user