cURL / Mailing Lists / curl-users / Single Mail

curl-users

How to make curl to download file over an already opened socket descriptor ???

From: tony vong <tonyvong2002_at_yahoo.com>
Date: Thu, 28 Apr 2005 14:29:04 -0700 (PDT)

Hi I am adding some kind of web scanning code into a
http proxy. Somewhere in the code where the proxy is
ready to send the HTTP GET request to the server, I
added some code to first download the URL and scan it
before letting the proxy to send the GET request out.
I was using something like system("/usr/local/bin/curl
url name ..."). This works well only if the server
does not require any session information. In other
words, the mechanism wont work if I try to intercept
some download via, for example, mail.yahoo.com because
the curl will open a fresh tcp connection, about which
the server has not session information. So I am
wondering whether it is possible to make curl talk to
the server via an already opened socket descriptor.
That way I can just pass the socket descriptor to the
curl instead of calling system("curl ...") !!!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2005-04-28