cURL / Mailing Lists / curl-library / Single Mail

curl-library

Netscape cookie file

From: Andrés García <fandom_at_retemail.es>
Date: Wed, 23 May 2001 01:29:21 +0200

Hi,

I have noticed that, sometimes, netscape and mozilla don't save
the path of a cookie, for example, it happens to me in
www.cajastur.es.

As the path is missing, libcurl discards the cookie. This seems
more netscape's problem than libcurl's, but it wouldn't be too
hard to support it doing something like:

--- cookie.c Wed May 23 01:18:52 2001
+++ curl-7.7.4-pre2/lib/cookie.c Fri Jan 5 11:11:42 2001
@@ -235,8 +235,3 @@
       case 2:
- if ((strncmp("TRUE",ptr,4))&&(strncmp("FALSE",ptr,5))) {
- co->path = strdup(ptr);
- } else {
- co->path = "/";
- fields++;
- }
+ co->path = strdup(ptr);
         break;

It works but it feels like a kludge.

Andres

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-05-23