From: Daniel Stenberg Date: Fri, 2 Dec 2022 07:30:30 +0000 (+0100) Subject: cookie: open cookie jar as a binary file X-Git-Tag: curl-7_87_0~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73d6f41489f75d4de71085019d2b03f4b28b16a3;p=thirdparty%2Fcurl.git 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 --- 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); }