On 10/10/2017 02:06 AM, Erik Johansson wrote:

On 9 October 2017 at 19:17, Rudy via curl-library <[email protected] <mailto:[email protected]>> wrote:

    Goal:
    slow_script.pl <http://slow_script.pl> | curl
    "-FmyUpload=@-;filename=foo.txt" --wait-for-eof-for-upload
    https://user:[email protected]/upload.php
    <https://user:[email protected]/upload.php>


Or install moreutils and use sponge.
slow_script.pl <http://slow_script.pl> | sponge | curl ...

That doesn't work as items in the pipeline are all executed simultaneously. (Curl starts before sponge finishes.)

EXAMPLE$ date > date1 | sleep 10 | date > date2
EXAMPLE$ cat date*
Mon Oct 30 09:41:42 PDT 2017
Mon Oct 30 09:41:42 PDT 2017


This would work if curl didn't initiate HTTP until first piece of data gets send. Maybe a '=FmyUload=@-' should cause curl to wait for at least one byte (different, but similar, to waiting for EOF).



Rudy
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to