cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: cURL under Windows stops reading data from stdin on ^Z (fwd)

From: Gisle Vanem <giva_at_bgnett.no>
Date: Thu, 27 Oct 2005 14:32:20 +0200

> So how do we work around it? Set stdin to binary mode?

Yes. main.c patch:

@@ -3604,6 +3604,9 @@

         }
         else if(uploadfile && curlx_strequal(uploadfile, "-")) {
+#ifdef O_BINARY
+ setmode(fileno(stdin), O_BINARY);
+#endif
           infd = stdin;
         }

------------

A curious side-effect from "curl -T- ftp://host < file" is that 'file' ends
up as '(nil)' on the server. Intended?

--gv
Received on 2005-10-27