문제

When I try to curl using the -T option, I get an empty reply:

$ curl --digest -u me:pwd -H "Content-Type:application/xml" -T test.xml http://localhost:8085/
curl: (52) Empty reply from server

Anyone know the incantation? The server works fine when connecting to it from the WebDAV client built into MacOSX.

도움이 되었습니까?

해결책

By default curl sends Expect: Continue, but unfortunately java web containers don't play nicely with the Expect header. The simplest answer is to instruct curl not to send that header:

curl --digest -u a2 -H "Content-Type:application/xml" -H "Expect:" -T TestPBE-workspace.xml http://localhost:8080/users/a2/files2/

The better solution is to make expect:continue work, but from the research i've done it appears that depends on what web container you're using.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top