From 73d6f41489f75d4de71085019d2b03f4b28b16a3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 2 Dec 2022 08:30:30 +0100 Subject: [PATCH] cookie: open cookie jar as a binary file On Windows there is a difference and for text files, ^Z means end of file which is not desirable. Ref: #9973 Closes #10017 --- lib/cookie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cookie.c b/lib/cookie.c index 1cc923f8fb..bccf2e8882 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -1264,7 +1264,7 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, fp = NULL; } else { - fp = fopen(file, FOPEN_READTEXT); + fp = fopen(file, "rb"); if(!fp) infof(data, "WARNING: failed to open cookie file \"%s\"", file); }