cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Mulit Interface is not working with proxy

From: <Reddy_Chenna_at_emc.com>
Date: Wed, 2 Apr 2008 23:58:50 -0400

Thanks Daniel for the quick response.
Looks like I have missed important point in the mail contents. The test
case 547 is with "easy" interface and not with "multi" interface. Facing
problem when I use "multi" interface with the proxy. If I remove the
proxy settings in case of "multi" interface the code is working fine.
With "easy" interface the proxy settings are working with "multi"
interface I am facing the problem.
The problem is the curl client is not establishing the connection with
the proxy interface itself.
The same "multi" interface is working for "GET" request and not for the
"POST" request.
The requirement of mine to use "multi" interface is to use the
asynchronous. In case of "easy" interface it is synchronous.
What I want to achieve is.
Establish a connection with the http server. Get connection.
I will get a data from other stream. What ever the data comes just put
on to the socket using readcallback and using multi_perform. In the same
POST sequence. I am not requesting another request to the server.
Close the request by returning 0 from readcall back. So that the POST
request gets completed. I will read the response at the last.

From: Daniel Stenberg <daniel_at_haxx.se
<mailto:daniel_at_haxx.se?Subject=Re:%20Mulit%20Interface%20is%20not%20w
orking%20with%20proxy> >
Date: Wed, 2 Apr 2008 16:40:39 +0200 (CEST)
On Wed, 2 Apr 2008, penugonda chenna reddy wrote:
> The below code is working fine without proxy. If I enable proxy code
by
> Uncoomenting the proxy setopts code The code is failing to connect to
proxy.
> I am using curl 7.18.0 version.
Test case 547 is very similar to your description, and it works fine...
So exactly how does it fail?
> static size_t read_callback(void *ptr, size_t size, size_t nmemb, void

> *userp)
> {
> memcpy(ptr,buffer,length);
> return length;
> }
This seems to be wrong. Does it always copy the same data and size?
> size_t sicfwrite(void* data,size_t len)
> {
> buffer = data;
> length = len;
> int handles;
> while(CURLM_CALL_MULTI_PERFORM ==
> curl_multi_perform(handler, &handles));
> return len;
This seems a bit ineffective. I'd say you want to return status to the
caller
when one or more transfers are done.

-- 
  Commercial curl and libcurl Technical Support:
http://haxx.se/curl.html
Received on 2008-04-03