cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

Re: [cURLpp] mErrorBuffer contains garbage in some cases

From: Jean-Philippe Barrette-LaPierre <jpb_at_rrette.com>
Date: Mon, 29 Aug 2005 09:08:13 -0400

On Saturday 27 August 2005 19:18, Peteris Krumins [Newsgroups] wrote:
> Hello!
>
> There are cases when mErrorBuffer is never filled with anything and
> when an exception
> is thrown, what() returns that garbage.
> For example, if the url to be retrieved is not set (is left empty),
> then cURL will just return error code
> CURL_URL_MALFORMAT (in transfer.c:Curl_pretransfer()) and will not fill
> the error
> buffer!

I just found what was the problem. I forgot to fill the mErrorBuffer with
zeros. I think that CURL_URL_MALFORMAT don't set an error message, so that's
why the buffer was invalid.

>
> There might be others but I don't have time to debug this problem.
> I suggest to handle these special cases in cURLpp::CurlHandle::perform().
>

Yeah, I think I'll clear the buffer each time (if libcURL don't do it
already).

>
> P.Krumins
> _______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp

-- 
Jean-Philippe Barrette-LaPierre
cURLpp maintener (http://rrette.com/curlpp.html)
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2005-08-29

These mail archives are generated by hypermail.

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

File upload with ASP.NET