cURL / Mailing Lists / curl-library / Single Mail

curl-library

Weird cookie files

From: MigueL DíaZ <tiomiguel_at_gmail.com>
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 0.43.channel.facebook.com:80
-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 @Ä·?cebook.com:80
-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
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

.facebook.com TRUE / FALSE 1360519681 datr -stripped-
.facebook.com TRUE / FALSE 1 lsd -stripped-
.facebook.com TRUE / FALSE 1 reg_fb_gate -stripped-
.facebook.com TRUE / FALSE 1 reg_fb_ref -stripped-
.facebook.com TRUE / FALSE 0 c_user -stripped-
.facebook.com TRUE / FALSE 0 cur_max_lag -stripped-
.facebook.com TRUE / FALSE 0 L -stripped-
.facebook.com TRUE / FALSE 1360519681 lu -stripped-
.facebook.com TRUE / FALSE 0 made_write_conn -stripped-
.facebook.com TRUE / TRUE 0 s -stripped-
.facebook.com TRUE / FALSE 0 sct -stripped-
.facebook.com TRUE / FALSE 0 W -stripped-
.facebook.com TRUE / FALSE 0 xs -stripped-
.facebook.com 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,
Miguel.

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

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-11