当我尝试使用-T选项卷曲时,我得到了一个空的回复:
$ curl --digest -u me:pwd -H "Content-Type:application/xml" -T test.xml http://localhost:8085/
curl: (52) Empty reply from server有人知道这个咒语吗?当从MacOSX中内置的WebDAV客户端连接到服务器时,服务器工作得很好。
发布于 2012-09-05 09:02:31
默认情况下,curl会发送Expect: Continue,但不幸的是java web容器不能很好地处理Expect头文件。最简单的答案是指示curl不发送报头:
curl --digest -u a2 -H "Content-Type:application/xml" -H "Expect:" -T TestPBE-workspace.xml http://localhost:8080/users/a2/files2/更好的解决方案是让expect:继续工作,但从我所做的研究来看,这似乎取决于你使用的web容器。
https://stackoverflow.com/questions/12271070
复制相似问题