cURL / Mailing Lists / curl-library / Single Mail


Weird cookie files

From: MigueL DíaZ <>
Date: Fri, 11 Feb 2011 17:04:33 -0430

Hi all!

I've been a libcurl user for a year or more and I'm running into an issue
I've never seen before...

I'm using libcurl to interact with facebook in my C app. I'm basically using
http and https, post and get requests.

I recently moved my app from Fedora 11 to CentOS 5.5 (using in both a fresh
compiled curl 7.21.3), and since then whenever my app ends, I'm finding this
weird looking files in my app dir! They look like this:

-rw-rw-r-- 1 user group 857 Feb 11 21:16 ??|????
-rw-rw-r-- 1 user group 857 Feb 11 21:16 ???????
-rw-rw-r-- 1 user group 857 Feb 11 21:16 0@???>???
-rw-rw-r-- 1 user group 857 Feb 11 21:16
-rw-rw-r-- 1 user group 857 Feb 11 21:16 49.19
-rw-rw-r-- 1 user group 857 Feb 11 21:16 8@???>???
-rw-rw-r-- 1 user group 857 Feb 11 21:16 @Ä·?
-rw-rw-r-- 1 user group 857 Feb 11 21:16 P?|?

If I run 'file' on any one of them, the output is like:

49.19: Netscape cookie text

The file contents looks like a valid cookie file (I'm tripping the actual
values, but they look fine):

# Netscape HTTP Cookie File
# This file was generated by libcurl! Edit at your own risk. TRUE / FALSE 1360519681 datr -stripped- TRUE / FALSE 1 lsd -stripped- TRUE / FALSE 1 reg_fb_gate -stripped- TRUE / FALSE 1 reg_fb_ref -stripped- TRUE / FALSE 0 c_user -stripped- TRUE / FALSE 0 cur_max_lag -stripped- TRUE / FALSE 0 L -stripped- TRUE / FALSE 1360519681 lu -stripped- TRUE / FALSE 0 made_write_conn -stripped- TRUE / TRUE 0 s -stripped- TRUE / FALSE 0 sct -stripped- TRUE / FALSE 0 W -stripped- TRUE / FALSE 0 xs -stripped- TRUE / FALSE 1298063768 locale -stripped-

My app setups an easy handle for each user with a COOKIEFILE and a
COOKIEJAR, and they are created correctly, I also add a share handle with
its own mutex.

Then a second curl easy handle is created for each user with the same share
handle and a different cookie file (also created correctly).

Whenever my app wants to end, I close all the handles before I exit.

I don't know if this is important, requests are performed in a threadpool
fashion, any thread can process data from any user, but only a thread can
access an specific user at a time, and the curl handles are per user, a
thread always the handles stored for that user.

As I stated before, I've never faced this issue in Fedora 11, Today I
started in CentOS 5.5 and the weird files are all over the place.

I'd appreciate any advice in how to start tracking the cause of this issue.

Best Regards,

"Think" is not a four-letter word.
        -- Anonymous

List admin:
Received on 2011-02-11