The issue that lead me here turned out to be a basic user error - I wasn't including the @
sign in the path of the file and so curl was posting the path/name of the file rather than the contents. The Content-Length
value was therefore 8 rather than the 479 I expected to see given the legnth of my test file.
The Content-Length
header will be automatically calculated when curl reads and posts the file.
curl -i -H "Content-Type: application/xml" --data "@test.xml" -v -X POST https://<url>/<uri/
... < Content-Length: 479 ...
Posting this here to assist other newbies in future.