我正在使用一个应用程序,需要将文件通过HTTP协议的PUT
方法上传到服务器。我使用的服务器是Nginx,但是返回了405 Not Allowed
错误。以下是使用cURL进行测试的示例:
curl -X PUT \
-H 'Content-Type: application/x-mpegurl' \
-d /Volumes/Extra/playlist.m3u8 http://xyz.com
而我从 Nginx 收到的回应是:
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.1.19</center>
</body>
</html>
我需要做什么才能允许PUT
请求?
任何提示都会很棒!
nginx
已经接受的内容,例如GET
,POST
... - Gwyneth Llewelyn