Merge pull request #670 from carlolars/webdav_move_incorrect_response

MOVE request should not return MultiStatus when successful.
This commit is contained in:
Karel Picman 2017-02-17 08:50:32 +01:00 committed by GitHub
commit 9a02c7f8c5

View File

@ -176,17 +176,7 @@ module RedmineDmsf
status = resource.move(dest, overwrite)
end
response['Location'] = "#{scheme}://#{host}:#{port}#{url_format(dest)}" if status == Created
# RFC 2518
if collection
multistatus do |xml|
xml.response do
xml.href "#{scheme}://#{host}:#{port}#{url_format(status == Created ? dest : resource)}"
xml.status "#{http_version} #{status.status_line}"
end
end
else
status
end
status
end
end
end