curl / Mailing Lists / curl-library / Single Mail


Request: flag for delayed start of HTTP until STDIN sends EOF

From: Rudy via curl-library <>
Date: Mon, 9 Oct 2017 10:17:18 -0700

I have a script that takes a couple of minutes to run, and I pipe the
ouput to curl to 'save' the output to an internal ops server. Piping
into curl doesn't work as the script is not done and for some reason
curl starts the HTTP session with the server and doesn't send the file.

It would be neat to have a flag in curl that 'waited until EOF before
starting the HTTP session with the server'.

Problem: | curl "-FmyUpload=@-;filename=foo.txt"

Work Around: | (sleep 60 && curl "-FmyUpload=@-;filename=foo.txt"

Goal: | curl "-FmyUpload=@-;filename=foo.txt"

As the years go by, I am sure I'll have to bump the 60 to 120 seconds
(or rewrite my script).  with the flag in place, sys admins around the
work could put off refactoring shell scripts for years!  Think about all
the time saved!


Received on 2017-10-09