curl-library
A bug in libcurl (maybe?)
Date: Sun, 15 Jul 2001 03:45:42 -0500
The default action for CURLOPT_WRITEFUNCTION is to call its callback without
necessarily a non-null CURLOPT_FILE.
The way I act in this case is (in englishified C):
If CURLOPT_FILE is NULL, return size * nmemb;
However, the callback for CURLOPT_HEADERFUNCTION is _not_ called if
CURLOPT_WRITEHEADER is NULL. Shouldn't it act similarly to
CURLOPT_WRITEFUNCTION?
I want CURLOPT_WRITEHEADER to be called when I give NULL for WRITEFUNCTION,
because I only want to parse the header data instead of actually outputting it
anywhere. Since I only need to parse a single line (a specific cookie line),
I don't want to create a buffer of arbitrary size for this purpose, when no data
will actually even enter the buffer anyways
Anyways, two questions:
Could what I said really be called a bug and,
Is there anyway I can get CURLOPT_WRITEHEADER to be called even if WRITEFUNCTION
is NULL without creating a buffer or outputting to any stream? I know I can
ignore certain streams in the callback function, but that seems unclean.
Sorry for my weird, uncomprehensible wording =)
And thanks in advance,
Jonathan Hseu
-- Website: http://www.vomjom.org/ irc.openprojects.net: vomjom Channels: #debian, #nvidia AIM: vomjom E-mail: vomjom_at_vomjom.org, vomjom_at_earthlink.net
_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
- application/pgp-signature attachment: stored