Send "Conflict" message body with 409 responses (closes #409)
This commit is contained in:
parent
9a9a9c79e5
commit
83d8f29a04
@ -133,7 +133,7 @@ module RemoteStorage
|
||||
|
||||
def put_data(user, directory, key, data, content_type)
|
||||
server.halt 400 if server.env["HTTP_CONTENT_RANGE"]
|
||||
server.halt 409 if has_name_collision?(user, directory, key)
|
||||
server.halt 409, "Conflict" if has_name_collision?(user, directory, key)
|
||||
|
||||
existing_metadata = redis.hgetall redis_metadata_object_key(user, directory, key)
|
||||
url = url_for_key(user, directory, key)
|
||||
|
@ -134,6 +134,7 @@ describe "App" do
|
||||
end
|
||||
|
||||
last_response.status.must_equal 409
|
||||
last_response.body.must_equal "Conflict"
|
||||
|
||||
metadata = redis.hgetall "rs:m:phil:food"
|
||||
metadata.must_be_empty
|
||||
|
Loading…
x
Reference in New Issue
Block a user