Uploading a file using ruby Net:HTTP API to a remote apache server failing with 409 Conflict

若如初见. 提交于 2019-12-06 05:13:11
MPK

The problem was resolved when I changed line 5 to this:

request = Net::HTTP::Put.new("#{uri.request_uri}/test.file")

The error "cannot PUT to a collection" means, an upload cannot be done against a folder. A file name must be specified.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!