]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cookie: open cookie jar as a binary file
authorDaniel Stenberg <daniel@haxx.se>
Fri, 2 Dec 2022 07:30:30 +0000 (08:30 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 2 Dec 2022 09:07:41 +0000 (10:07 +0100)
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

index 1cc923f8fbbff0d3233fbe6eda97eacc62904965..bccf2e8882404b752750946496506bf6da839652 100644 (file)
@@ -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);
   }