curl-library
Re: is this a bug in libcurl?
Date: Wed, 30 Jul 2003 21:03:56 +0800 (CST)
hi, daniel
this is the http header.
HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.0
Date: Wed, 30 Jul 2003 12:51:34 GMT
Content-Type: text/html;Charset=GB2312
HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.0
Date: Wed, 30 Jul 2003 12:51:34 GMT
Content-Type: text/html;Charset=GB2312
Location: searchstat.asp?vname=雍正王朝&uid=sauuzmgwqqwswxgxqgguzmgws
Content-Length: 180
Content-Type: text/html; Charset=GB2312
Set-Cookie: now=7%2F30%2F2003+8%3A51%3A35+PM; expires=Fri, 30-Jul-2004 12:51:34 GMT; path=/
Set-Cookie: path=search=%D3%BA%D5%FD%CD%F5%B3%AF%5E%5Eall; expires=Fri, 30-Jul-2004 12:51:34 GMT; path=/
Set-Cookie: buycar=; expires=Fri, 30-Jul-2004 12:51:34 GMT; path=/
Set-Cookie: lasttime=7%2F30%2F2003+8%3A51%3A35+PM; expires=Fri, 30-Jul-2004 12:51:34 GMT; path=/
Set-Cookie: uid=sauuzmgwaqwvfxgxqgguzmgws; expires=Fri, 30-Jul-2004 12:51:34 GMT; path=/
Cache-control: private
雍正王朝 is chinese character.
i think it's a bug in libcurl because ie can get right page no matter the post field is english or chinese.
Daniel Stenberg <daniel_at_haxx.se> wrote:
On Sun, 27 Jul 2003, [gb2312] xiao niu wrote:
> When i use CURLOPT_FOLLOWLOCATION, i found that if there are chinese
> characters in the new address the libcurl cannot process it correctly.
Can you please show us the full headers of such a server response?
> curl_easy_setopt(curl, CURLOPT_URL, "http://www.joyo.com.cn/ProdSearch/prodsearch.asp?uid=suuszxsswugibgzsmsgsasxww");
> curl_easy_setopt(curl, CURLOPT_POST, 1);
> /* Now specify the POST data */
> curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "vname=linux");
> curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
> /* Perform the request, res will get the return code */
> res = curl_easy_perform(curl);
> when i set CURLOPT_POSTFIELDS to "vname=linux", the lib can get the right
> page. but when i set it to "vname=中文", it cannot get the right page.
I don't see how this is a libcurl problem. libcurl will send the data you tell
it to send, if that doesn't make the server happy then I don't understand what
libcurl does wrong.
Doesn't it send exactly that specified chunk in the POST to the server??
> if i don't use CURLOPT_FOLLOWLOCATION, the result is
> Object MovedThis
> object may be found > HREF="searchstat.asp?vname=中文&uid=szqmuwmzlzwwsqxammgmasgum">here.
The actual contents of the web page is not very interesting, as libcurl acts
on the headers.
> is this a bug in libcurl? and if you need more information, pls tell me.
Again, please elaborate why this is a libcurl bug. It doesn't look like one to
me.
-- 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 --------------------------------- Do You Yahoo!? 暑期大片齐聚雅虎通 网络摄像头+雅虎通调频收音机等你来拿 ------------------------------------------------------- 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/01Received on 2003-07-30