cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: is this a bug in libcurl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 28 Jul 2003 09:08:40 +0200 (CEST)

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
> <head><title>Object moved</title></head> <body><h1>Object Moved</h1>This
> object may be found <a
> HREF="searchstat.asp?vname=&uid=szqmuwmzlzwwsqxammgmasgum">here</a>.</body>

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
Received on 2003-07-28

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET