cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_perform() wouldn't return after receiving all the data

From: Goden Wang <godenwang_at_gmail.com>
Date: Wed, 16 Dec 2009 16:10:31 +0800

Message: 5
> Date: Thu, 10 Dec 2009 22:22:24 +0100 (CET)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: curl_easy_perform() wouldn't return after receiving all
> the data
> Message-ID: <alpine.DEB.2.00.0912102216270.28832_at_tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
>
> On Wed, 9 Dec 2009, Goden Wang wrote:
>
> > I don't know what's the problem with my enviroment, it is amazing to me,
> I
> > test it for hunderds of times, it will stopped all the time, I really
> don't
> > know why it worked on your platform.
>
> So can you provide a simple C source code againt a public URL that repeats
> the
> problem for us to try?
>
> BTW, what exactly is your code supposed to do? The httppost.c file you
> posted
> makes a weird:
>
> curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
> curl_easy_perform(curl);
>
> As the only diff from the previous POST and it's far from clear to me what
> that is supposed to mean. Is that meant to be a GET?
>
> --
>
> / daniel.haxx.se
>
>
>
Sorry Dniel,

I didn't got too much time work on my own free project.

>So can you provide a simple C source code againt a public URL that repeats
the
>problem for us to try?

Sorry for I couldn't provide another public URL to repeat the problem.

Actually, the URL I tried is some property software, and didn't found any
free ones easy to test.

>BTW, what exactly is your code supposed to do? The httppost.c file you
posted
>makes a weird:

  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
  curl_easy_perform(curl);
>As the only diff from the previous POST and it's far from clear to me what
>that is supposed to mean. Is that meant to be a GET?

for the code in the demo:

  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
  curl_easy_perform(curl);

I need to transmit the data on the very connection for many times, because
of cookie. the cookie should be stored in the client and then the server
will response the client correctly. the client and server got some
agreement, when the client is up, it just need to told the server:"hi , I am
up, you just do anything you want",to act this purpose, the client should
post an empty packet to the server, and then the server will got control of
the connection, the empty post is just change the controler between the
client and server. When the server receive the empty post, if it did got
some action to try, it will send the request as a response to the client,
and the connection will go on.

so the packet follow should be, the client send some data to the server to
do a verificaiton, and when passed in the server part, the server will tell
the client to give the control to it, and then the client send an empty
post, the server got the control of the connection.

for I didn't found any software can act like the server, and I just found a
branded software in some occasion, so I just take the URL fo the server for
a test, maybe, I will wirte the server part after the client worked all
well.

Thank you for all your help. really appreciate..

BR...

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-16