zaqar should return appropriate http response code for existing queue name scenario
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zaqar |
New
|
Undecided
|
Unassigned |
Bug Description
I created a queue with name "samplequeue1one" as below -
stack@qaas-02:~$ curl -i -X PUT http://
HTTP/1.0 201 Created
Date: Tue, 20 Oct 2015 10:20:02 GMT
Server: WSGIServer/0.1 Python/2.7.6
content-length: 0
location: /v1.1/queues/
stack@qaas-02:~$
When I rerun the above curl command again with same queue name, it gives HTTP Response Code "204 No Content", which is wrong! This error code is used only if server successfully processed the request, but is not returning any content!
stack@qaas-02:~$ curl -i -X PUT http://
HTTP/1.0 204 No Content
Date: Tue, 20 Oct 2015 10:20:17 GMT
Server: WSGIServer/0.1 Python/2.7.6
location: /v1.1/queues/
Content-Length: 0
stack@qaas-02:~$
But here, zaqar won't process the request successfully becoz queue name already exist and it won't do any changes for existing one.
Whenever zaqar finds a queue name with existing one, it has to respond user with HTTP Response Code - "409"
# 409 Conflict
Details: Indicates that the request could not be processed because of conflict in the request, such as an edit conflict in the case of multiple updates.
When user gets "409 Conflict" response code then it is meant to try with different queue name.
2xx series are for Success
It would be nice to use appropriate http status code for this type of scenarios.
summary: |
- zzaqar should return 409 http response code for existing queue name + zaqar should return 409 http response code for existing queue name |
summary: |
- zaqar should return 409 http response code for existing queue name + zaqar should return appropriate http response code for existing queue + name scenario |
description: | updated |