cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: is this a bug in libcurl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 30 Jul 2003 15:16:15 +0200 (CEST)

On Wed, 30 Jul 2003, [gb2312] xiao niu wrote:

> Location: searchstat.asp?vname=ÓºÕýÍõ³¯&uid=sauuzmgwqqwswxgxqgguzmgws

This is a perfectly fine Location: header. libcurl has no problems with this.

> Set-Cookie: now=7%2F30%2F2003+8%3A51%3A35+PM; expires=Fri, 30-Jul-2004
> 12:51:34 GMT; path=/

This however, is a cookie you receive. You got several of them. But you don't
send any back when you follow the location:. I bet the server doesn't expect
or like that.

> i think it's a bug in libcurl because ie can get right page no matter the
> post field is english or chinese.

IE also sends the proper cookies in the second request. You don't.

You can fix this by using COOKIEFILE or COOKIEJAR.

(I'm not saying it'll automaticly work because you do this, I'm just showing
you one obvious difference between your request and what IE would do. There
are others as well, such as the referer and user-agent fields etc.)

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-30