Hello everyone,

the attached patch is a first try to fix test 1326 freezing on Windows.
But since I don't know if there are any side effects by setting stdin to
binary mode by default, I would like to ask for your feedback.

Thanks in advance and best regards,
Marc
>From f86b2d7694a83fbe3994822bd2b45bbe64fdbd0a Mon Sep 17 00:00:00 2001
From: Marc Hoersken <[email protected]>
Date: Sat, 5 Apr 2014 21:51:39 +0200
Subject: [PATCH] tool_operate: set stdin to binary and fix telnet test 1326 on
 Windows

---
 src/tool_operate.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/tool_operate.c b/src/tool_operate.c
index 99ec59a..9ade04d 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -726,6 +726,10 @@ static CURLcode operate_do(struct GlobalConfig *global,
                     "fcntl failed on fd=%d: %s\n", infd, strerror(errno));
           }
         }
+        else {
+          /* set stdin to binmode for protocols like telnet */
+          set_binmode(stdin);
+        }
 
         if(uploadfile && config->resume_from_current)
           config->resume_from = -1; /* -1 will then force get-it-yourself */
-- 
1.8.1.msysgit.1

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to