On 31-Jan-08, at 1:31 AM, Ryan Allen wrote:
> Hi JP,
>
> I have been running some tests. This is my output:
>
My mistake, I've done some specialization on the InfoTypeConverter,
but forgot to declare it.
The patch is attached.
> EFF URL
> RESP CODE 200
> HTTP CONN CODE 0
> BYTES UP 0
> BYTES DOWN 3624
> SPEED UP 0
> SPEED DOWN 1.91848e+06
> RESP HEAD SZ 273
> REQ HEAD SZ 49
> REQ CONTENT TYPE te
> RESP CONTENT LEN 3624
> REQ CONTENT LEN 0
> HTTP AUTH AVIL 0
> PROXY AUTH AVIL 0
> NUMBER CONNS 1
>
>
> Segmentation fault
>
>
> It looks like EFF URL, BYTES UP, SPEED UP, REQ CONTENT TYPE are
> broken.
> These values come from methods that have:
>
> std::string netClient::getEffURL() {
> std::string effURL;
> cURLpp::Infos::EffectiveUrl::get(*myRequest, effURL);
> return (effURL);
> }
>
>
>
>
> double netClient::getSizeUp() {
> return cURLpp::Infos::SizeUpload::get(*myRequest);
> }
>
>
>
>
> double netClient::getSpeedUp() {
> return cURLpp::Infos::SpeedUpload::get(*myRequest);
> }
>
>
>
> std::string netClient::getContentType() {
> return cURLpp::Infos::ContentType::get(*myRequest);
> }
>
>
>
> Hope this helps!
>
> Thanks,
> Ryan
>
>
>
> -----Original Message-----
> From: curlpp-bounces_at_rrette.com on behalf of Jean-Philippe Barrette-
> LaPierre
> Sent: Wed 1/30/2008 6:52 PM
> To: cURLpp's mailing-list
> Subject: Re: [cURLpp] using cURLpp::Infos::<whatever>::get( ... )
>
>
> On 30-Jan-08, at 6:34 PM, Ryan Allen wrote:
>
>> Hi Jean-Phillippe,
>>
>> The curlpp version I am working with is curlpp-0.7.1.
>> Thanks for taking a look.
>>
>
> Sorry, I meant libcurl (not curlpp) version. The best way to know it,
> would be to do:
>
> curl-config --version
>
>> -- Ryan
>>
>>
>>
>>> -----Original Message-----
>>> From: curlpp-bounces_at_rrette.com [mailto:curlpp-
>>> bounces_at_rrette.com] On
>>> Behalf Of Jean-Philippe Barrette-LaPierre
>>> Sent: Wednesday, January 30, 2008 7:18 AM
>>> To: cURLpp's mailing-list
>>> Subject: Re: [cURLpp] using cURLpp::Infos::<whatever>::get( ... )
>>>
>>> On Monday 28 January 2008 7:23 pm, Ryan Allen wrote:
>>>> Hi,
>>>>
>>>>
>>>>
>>>> I'm new to this list, and new to cURLpp! I've made really good
>>> progress
>>>> up to now, but I've found some issues using the Infos objects.
>>>>
>>>> Is this list always this quiet?
>>>>
>>>
>>> Mostly.
>>>
>>>>
>>>>
>>>> On ubuntu 7.10, the examples that use Infos seg fault:
>>>>
>>>
>>> I'm at the office, I don't have any setup to look into it. I'll try
>> to
>>> check
>>> tonight. BTW, can you specify which version of libcurl you're
>>> using?
>>>
>>>>
>>>>
>>>>
>>>>
>>>> ryan_at_Chomolunga:~/Downloads/curlpp-0.7.1/examples$ ./example04
>>>> 172.27.50.130/102.html
>>>>
>>>> * About to connect() to 172.27.50.130 port 80 (#0)
>>>>
>>>> * Trying 172.27.50.130... * connected
>>>>
>>>> * Connected to 172.27.50.130 (172.27.50.130) port 80 (#0)
>>>>
>>>>> GET /102.html HTTP/1.1
>>>>
>>>> Host: 172.27.50.130
>>>>
>>>> Accept: */*
>>>>
>>>>
>>>>
>>>> < HTTP/1.1 200 OK
>>>>
>>>> < Date: Tue, 29 Jan 2008 00:13:32 GMT
>>>>
>>>> < Server: Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6
>>>>
>>>> < Last-Modified: Sat, 25 Feb 2006 00:09:09 GMT
>>>>
>>>> < ETag: "858041-69-495c9340"
>>>>
>>>> < Accept-Ranges: bytes
>>>>
>>>> < Content-Length: 105
>>>>
>>>> < Content-Type: text/html
>>>>
>>>> <
>>>>
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
>>>>
>>>> <HTML>
>>>>
>>>> <HEAD>
>>>>
>>>> </HEAD>
>>>>
>>>> <BODY>
>>>>
>>>> </BODY>
>>>>
>>>> </HTML>
>>>>
>>>> * Connection #0 to host 172.27.50.130 left intact
>>>>
>>>> Effective URL:
>>>>
>>>>
>>>>
>>>> Effective URL:
>>>>
>>>> Response code: 200
>>>>
>>>> Segmentation fault (core dumped)
>>>>
>>>> ryan_at_Chomolunga:~/Downloads/curlpp-0.7.1/examples$
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Can someone provide the correct way to use this object, or are
>> there
>>>> bugs?
>>>>
>>>> Specifically, my application needs a way to capture the HTTP
>> response
>>>> headers. I also need a way to save the full HTTP request. Is
>> there a
>>>> way to do this? From reading the docs, it doesn't appear like
>> there
>>> is.
>>>>
>>>>
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>> -Ryan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Ryan Allen | Sr. Software Engineer
>>>>
>>>> F5 Networks
>>>>
>>>> P 206.272.5555
>>>>
>>>> F 206.272.5556
>>>>
>>>> www.f5.com <http://www.f5.com>
>>>>
>>>> D 206.272.6538
>>>
>>> --
>>> Jean-Philippe Barrette-LaPierre
>>> _______________________________________________
>>> cURLpp mailing list
>>> cURLpp_at_rrette.com
>>> http://www.rrette.com/mailman/listinfo/curlpp
>> _______________________________________________
>> cURLpp mailing list
>> cURLpp_at_rrette.com
>> http://www.rrette.com/mailman/listinfo/curlpp
>
> _______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp
>
>
> <winmail.dat>_______________________________________________
> cURLpp mailing list
> cURLpp_at_rrette.com
> http://www.rrette.com/mailman/listinfo/curlpp
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2008-02-03