Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
curl -X POST \
--data-binary '@File01.tar.gz' \
http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02.tar.gz
And I receive this error:
curl: (56) Failure when receiving data from the peer
But if I do this CURL:
curl -X POST \
--data-binary '@File01.tar.gz' \
http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02
Its works well.
Why is that?
Passing data to be uploaded in URL itself instead of POST
request
Probably Proxy blocking the request to the server.
In some cases, server do not support particular request, like some servers support PUT/POST
any one of them.
When I received this error last time, it was proxy blocking the request to the server.
But in your case, in non working case:
curl -X POST \
--data-binary '@File01.tar.gz' \
http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02.tar.gz
you have appended the file to be POST
in URL itself, which is the location actually not available on server,
These can be reason not sure, it happened to me long back while playing with cURL command-line.
–
This happened to me because my POST data was too big. I was doing:
curl -X POST localhost:9200/_bulk --data-binary @too-big.file
To resolve the issue, i split the file into 2 parts with:
split -l 150000 too-big.file
Then ran 2 POSTS:
curl -X POST localhost:9200/_bulk --data-binary @xaa
curl -X POST localhost:9200/_bulk --data-binary @xab
Mine was related to the Parsoid Service / VisualEditor for the MediaWiki environment
sudo service parsoid restart
Fixed it in my case
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.