cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl (win32) fails to upload binary data from stdin

From: Jan Dostrasil via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 04 Jun 2015 16:11:24 +0200 (CEST)

Hi, update to my problem: It is indeed a bug, but win32 compilation only. I
have tried win32 binaries provided by Dirk Paehl, Stefan Kanthak and Guenter
Knauf, neither of them work. Only cygwin version works (with ton of dll
dependencies), so I assume linux version is fine too.

I think that someone should add something like the following to curl source
(at least this is what I used in main() with old borland c compiler long time
ago):

#if defined( DOS ) || defined( _WIN32 )
        if ( setmode( fileno(stdin), O_BINARY ) == (-1) || setmode( fileno(stdout),
O_BINARY ) == (-1) ) {
                perror( "warning: failed to set binary mode for stdin/out" );
        }
#endif

With regards Jan Dostrasil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-04