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] BUG : PostFieldSize options

From: Jean-Philippe Barrette-LaPierre <jean-philippe.barrette-lapierre_at_savoirfairelinux.com>
Date: Tue, 19 Jul 2005 10:11:56 -0400

On July 19, 2005 09:55 am, Nicolas Le Goff wrote:
> Hi,
>
> This is my first post here, so please forgive me wether I'm breaking any
> rule(s).

You don't break any.

>
> In cURLpp version "0.5.0-rc7", in file "options.hpp", line 114, I think
> "PostFieldSize" should not be defined as "std::string" but as a "long".
>

You should use the last version of cURLpp, but it got the same problem.

> I think we should have
> typedef cURLpp::OptionTrait< long, cURL::CURLOPT_POSTFIELDSIZE >
> PostFieldSize;
> and the same goes for the "CURLOPT_POSTFIELDSIZE_LARGE" wrapper 2 lines
> after.

You're right, but for *_LARGE it's a cURL::curl_off_t.

>
> I experienced troubles in the "Content-Length" header when setting
> PostFielSize to a std::string.
> No more trouble after changing this to a long.
>

I made the changes in the repository.

> Hope it could help.
>

Yeah thanks!

Don't forget that you don't need to change the sources in order to get the
option with the type you want.

You can just add this in YOUR code:

namespace MyNameSpace {
    typedef cURLpp::OptionTrait< long, cURL::CURLOPT_POSTFIELDSIZE >
PostFieldSize;
}

and then use MyNameSpace::PostFieldSize instead of cURLpp::PostFieldSize;

But you were right, the option was wrong.

>
> Nicolas LE GOFF
>
>
> _______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp

-- 
Jean-Philippe Barrette-LaPierre
Savoir-Faire Linux
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2005-07-19

These mail archives are generated by hypermail.

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

File upload with ASP.NET