cURL / Mailing Lists / curl-users / Single Mail

curl-users

Bug in cookie parsing?

From: Dirk Kruschewski <dk_at_nightmare.de>
Date: Sat, 23 Sep 2000 19:21:30 +0200

Hi,

I have a problem with sending cookies back to the server. I received the
cookie and write the header with -D to a file. In the next step I will
send it back with option -b. But this does not work. curl does not send
the cookie. :-(

The problem is that in cookie.c the lineptr is divided by semicolons and
the part in the left of the semicolon is parsed. This works only correctly
if the last character of the cookie line is a semicolon. IMHO it is not
necessary that the cookie ends with a semicolon. Please correct me, if I
am wrong.
(In my example the server sends only "Set-Cookie: ID=xyz".)

For me I made a quick and dirty hack in function cookie_init. Right after
the comment "This is a cookie line, get it!" I add a semicolon to the
variable line. But I do not know in the moment, if this does not produce
problems in other scenarios.

regards Dirk.

-- 
"Ich schaetz, dass es so ist, weil es so war und auch so bleibt,
 ich habīs nicht so gemacht, ich bin nur der, der es schreibt." - RHP
Received on 2000-09-23