curl-users
Re: send data over socket using libcurl
Date: Wed, 7 Jan 2009 19:55:29 +0100 (CET)
On Wed, 7 Jan 2009, Dhiren wrote:
This topic is libcurl related so the curl-library is clearly a more suitable
mailing list!
> 1. i had used diffrent formate to send data .
> //char *request = "GET https://202.189.252.134:80 HTTP/1.1\r\n";
> char *request = "GET / HTTP/1.1\r\nHost: 202.189.252.134\r\nConnection:
> Close\r\n\r\n";
> // char *request = "connect to server.";
>
> for curl_easy_send. and it's return CURLE_OK. but getting problem in
> curl_easy_recv
> it's return proxy error :
> HTTP/1.1 502 Proxy Error ( The Uniform Resource Locator (URL) does not use a
> recognized protocol. Either the protocol is not supported or the request was
> not typed correctly. Confirm that a valid protocol is in use (for example,
> HTTP for aWeb request). )
Why are you doing this complicated anyway? Why can't you just send the stuff
using the "normal" way?
"GET /" is not a legal request to a proxy so of course it'll return an error
back. See RFC2616 for details.
> 2. when using
> char *request = "connect to server."; // for send buffer
> and at server a application listning the port 443 and when get connect send
> a response on same socket.
> then getting response null curl_easy_recv. and CURLcode = CURLE_AGAIN
>
> so please give me the solution where i am going wrong.
CURLE_AGAIN is quite a normal situation. What's the problem with that?
> please help me it's very urgent .
Isn't it always? If you really want a fast solution my advice is: use a
traditional libcurl approach and consider hiring a professional to do it for
you.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-01-07