Re: gcc compile problem under ubuntu

2012-06-20 Thread Ben Noordhuis
On Wed, Jun 20, 2012 at 5:49 PM, Alexandre BM wrote: > Hello everybody, > > I'm trying to compile a c programe that uses libcurl under Ubuntu 12.04, > Libcurl is correctly installed (I hope). but the linking is not working > > gcc -lcurl functions.o main.o -o myprogram > > I'm gettings these error

Re: libcURL build static lib

2011-05-31 Thread Ben Noordhuis
On Tue, May 31, 2011 at 04:18, mammar wrote: > My apologies for top-posting Ben. > Is it fine now? Much better, thanks! > Instead of linking with msvcrt.lib/msvcrt.a, can't we generate a >  libcurl.lib file? Just so we're on the same level: the libcurl.a is for all practical means and purposes

Re: libcURL build static lib

2011-05-30 Thread Ben Noordhuis
On Mon, May 30, 2011 at 16:42, mammar wrote: > Thanks for reply. > But i am getting the following link errors with VS > libcurl.a(libcurl_la-transfer.o) : error LNK2001: unresolved external symbol > ___divdi3 > libcurl.a(libcurl_la-progress.o) : error LNK2001: unresolved external symbol > ___divdi

Re: libcURL build static lib

2011-05-30 Thread Ben Noordhuis
On Mon, May 30, 2011 at 15:46, mammar wrote: > I am using the following command to build libcURL static library(.lib) using > MingW > ./configure --prefix=/mingw --enable-static=yes --enable-shared=no > --disable-ldap > and after that the make command > > but it is generating the following three i

Re: DNS look up will always fail, if thread is started with network cable disconnected.

2011-05-20 Thread Ben Noordhuis
On Fri, May 20, 2011 at 10:38, Henrik Heino wrote: > I'm using libcurl with easy interface in a multithreaded program. The system > is FreeBSD and libcurl version is 7.20. I have noticed strange problem in > the following case: I boot computer without network cable connected. Then I > start my pro

Re: CA Certificates on Windows

2011-05-19 Thread Ben Noordhuis
2011/5/19 Michal Lukáč : > I'm using the latest win32 binary of the libcurl library to > provide a HTTPS backend to a larger application (essentially, just to send a > POST request to a CGI script and parse a reply). The problem, however, is > that I can't seem to verify the server's CA certificate

Re: Threaded resolver breaks MOC

2011-05-17 Thread Ben Noordhuis
On Wed, May 18, 2011 at 01:52, Dave Reisner wrote: > I'm investigating a bug report [1] for Arch Linux which we received a > few months ago regarding MOC [2] being unable to play streams. MOC is > linked against curl and uses the multi interface. To summarize the bug > report, I determined that it

Re: Metrics on server execution time and transfer time

2011-05-04 Thread Ben Noordhuis
On Wed, May 4, 2011 at 10:32, Daniel Stenberg wrote: >> the time server spends in calculating a result seperately. > > That's not exactly possible. You would have to time it from the last (or > first?) byte of the request is sent until the first byte of the response is > received as all timing is

Re: Boost::thread and libcurl

2011-04-30 Thread Ben Noordhuis
On Sat, Apr 30, 2011 at 22:49, Daniel Stenberg wrote: > It would make sense if the 10 threads used 100% CPU, but usually getting 10 > simultaneous transfers don't consume all CPU so adding more threads should > not make them run (much) longer. The more threads you have, the more time they'll spen

Re: "SSL connection timeout at ..." when using network over GPRS/EDGE

2011-04-30 Thread Ben Noordhuis
On Sat, Apr 30, 2011 at 20:04, Kamil Dziedzic wrote: > I've created script which tests requests to our server over diffrent networks. > Everything worked fine until I tried to send ssl request over GPRS/EDGE. > > Over normal network (cable/wifi) everything is fine (I used google as example > serve

Re: Boost::thread and libcurl

2011-04-30 Thread Ben Noordhuis
On Sat, Apr 30, 2011 at 02:30, Radu Brumariu wrote: > I have a small app written in C++ using boost::thread and in each > thread I GET a url and then collect the TOTAL_TIME for the call. > For some reason, the total time to complete the request is getting > higher in direct proportion with the num

Re: libcURL application failed to initialize properly

2011-04-26 Thread Ben Noordhuis
On Tue, Apr 26, 2011 at 23:25, mammar wrote: > #include > #include > > int main(void) > { >   CURL *curl; >   CURLcode res; > >   curl = curl_easy_init(); >   if(curl) { >     curl_easy_setopt(curl, CURLOPT_URL, "www.linux.com"); >     res = curl_easy_perform(curl); > >     /* always cleanup */

Re: libcurl and sock_cloexec

2011-04-26 Thread Ben Noordhuis
On Tue, Apr 26, 2011 at 16:00, Paul Albrecht wrote: > Sockets are created with the socket system call, not the open system > call, so we're talking about setting the SOCK_CLOEXEC flag as the > default whenever a socket is created using the socket system call. This > will have to be configurable on

Re: libcurl and sock_cloexec

2011-04-25 Thread Ben Noordhuis
On Mon, Apr 25, 2011 at 23:41, Daniel Stenberg wrote: > I guess the question could perhaps also be put the other way: could there > actually and realistically be any harm in making the sockets use F_CLOEXEC > unconditionally? Backwards compatibility? The child process needs to handle EBADF from s

Re: libcurl and sock_cloexec

2011-04-25 Thread Ben Noordhuis
On Mon, Apr 25, 2011 at 22:26, Daniel Stenberg wrote: > On Mon, 25 Apr 2011, Paul Albrecht wrote: > >> I need the option set when the socket is created so >> CURLOPT_SOCKOPTFUNCTION (setsockopt) is too late. I'll try the >> CURL_OPENSOCKETFUNCTION (socket) which should work, but why is the callbac

Re: post-callback example

2011-04-19 Thread Ben Noordhuis
On Tue, Apr 19, 2011 at 15:14, Jan de Lint wrote: > In what form does the file arrive at the host as compared to a file posted > with curlform-copyname and curlform_file? > I see nothing coming in at the host end (PHP). I suspect you want CURLFORM_FILECONTENT. A single file is sent as multipart/

Re: install problem on windows and studio 2008

2011-04-19 Thread Ben Noordhuis
On Mon, Apr 18, 2011 at 20:45, Fred Bayoff wrote: > I then downloaded: libcurl-7.19.3-win32-ssl-msvc.zip which unzipped provided > the curllib.dll > > Then under Studio I go project properties, linker, input and put in > curllib.dll > under c/c++/general I add the include and lib paths > > Under t

Re: Reusing easy handle from multiple threads

2011-04-19 Thread Ben Noordhuis
On Tue, Apr 19, 2011 at 03:53, Vladimir Grishchenko wrote: > T1 acquires H1 from the pool > T1 calls curl_easy_setopt(H1) > T1 calls curl_easy_perform(H1) > T1 returns H1 to the pool > T2 acquires H1 from the pool > > T2 calls curl_easy_setopt(H1) > > T2 calls curl_easy_perform(H1) > > T2 returns

Re: Curl-library in Pocket PC 2003 (ARMV4) project using MSVC

2011-04-13 Thread Ben Noordhuis
On Wed, Apr 13, 2011 at 11:19, H.J. Koster wrote: > I've been busy for a while now configuring my IDE (MSVC) for libCurl. > I downloaded the latest libCurl from the website > (http://curl.haxx.se/dlwiz/?type=devel&os=Win32&flav=MSVC) <--- is this the > correct one? > > Because libCurl uses some fu

Re: Advantages of mutli handle over multithread easy handle

2011-04-12 Thread Ben Noordhuis
On Tue, Apr 12, 2011 at 13:58, Vishakha Vaidya wrote: > I use easy interface in a threaded model and am considering a move to multi > handles again using a thread model. I prototyped the two but don't see a gain > in performance in terms of time taken, is that expected ? Performance isn't quite

Re: Advantages of mutli handle over multithread easy handle

2011-04-12 Thread Ben Noordhuis
On Tue, Apr 12, 2011 at 13:27, Vishakha Vaidya wrote: > What would be the advantages of using a multi handle over using multiple > threads using easy handles (referring to example multithread.c) ? > > I understand the multihandle is non blocking, but how would that help me if > I’m writing an ftp

Re: No surprise github pull requests please

2011-04-09 Thread Ben Noordhuis
On Sun, Apr 10, 2011 at 00:21, Daniel Stenberg wrote: > At github.com, anyone can provide a patch for curl and send a "pull request" > to me personally and ask me to get that patch into the curl master source > tree. > > While I appreciate pull requests with good features and fixes, just sending >

Re: Upload file Issue

2011-03-31 Thread Ben Noordhuis
On Thu, Mar 31, 2011 at 14:33, Pallavi Varade wrote: > I am not an user of libcurl. I want to use it for the above functionality. > So i m asking, is there any way i can work with libcurl for getting uploaded > file path in web browser like FF and chrome. You shouldn't top-post. Do you want to c

Re: Sending Https request over proxy aborts

2011-03-24 Thread Ben Noordhuis
On Thu, Mar 24, 2011 at 22:17, taher daryani wrote: > I am using libcurl to send  http/https requests through a proxy. It works > fine for http requests but it returns error 407 for https requests if I use > CURLAUTH_ANY. If I use CURLAUTH_BASIC then the request would succeed. > * Proxy CONNECT a

Re: Fraudulent Certificates

2011-03-24 Thread Ben Noordhuis
On Thu, Mar 24, 2011 at 09:22, Daniel Stenberg wrote: > There's this incident that has been talked about the last couple of days > where "an attacker" managed to get several fraudulent SSL certificates for > public websites. > > Chrome and Firefox now both block these certificates explicitly. > >

Re: building libcurl with SSL on AIX53/61

2011-03-23 Thread Ben Noordhuis
On Wed, Mar 23, 2011 at 17:42, Alona Rossen wrote: > Symbols are not exported when I link libcurl statically to OpenSSL libraries > (OpenSSL 0.9.8e and OpenSSL 1.0.0d) on AIX53 and AIX61 > > exec(): 0509-036 Cannot load program ./a.out because of the following > errors: > > rtld: 0712-001 Symbol C

Re: Question regarding SSL caching behavior of LibCurl

2011-03-22 Thread Ben Noordhuis
On Tue, Mar 22, 2011 at 19:13, ajil koshy wrote: > I am writing an HTTPS client application using libcurl compiled with > OpenSSL. I had a question regarding behavior of Libcurl with respect to SSL > session caching. It seems it is enabled by default. I would like to know if > the cache still rema

Re: raise chunks of memory in callback

2011-03-22 Thread Ben Noordhuis
On Tue, Mar 22, 2011 at 10:06, Oscar Salvador wrote: > My question is that i'm retrieving an image from internet, and i write > this image into a memory chunk with WRITEFUNCTION  and WRITEDATA. The > problem is that libcurl retrieves the image a little slow, because it > calls many times the callb

Re: Connecting using client certificates

2011-03-21 Thread Ben Noordhuis
On Mon, Mar 21, 2011 at 17:56, plot.lost wrote: > I thought the CURLOPT_CAINFO / CAPATH was used for specifying certificates > that are used by curl to verify the server certificate, not anything that > are used as part of the client certificate processing. Ah, it kind of depends. But if you can

Re: Connecting using client certificates

2011-03-21 Thread Ben Noordhuis
On Mon, Mar 21, 2011 at 17:07, plot.lost wrote: > I am trying to connect to a systems (https) that requires client > certificates, using the curl_easy interface. > > I think I've set the required options (CURLOPT_SSLCERT and CURLOPT_SSLKEY) > but the connection gets rejected. > > According to the

Re: It's a bad idea to do this, isn't it?

2011-03-18 Thread Ben Noordhuis
On Fri, Mar 18, 2011 at 20:57, Saqib Ali wrote: > Within my progress-callback function, when I got to 100% transferred, I was > deleting the corresponding curl handle. > It was then crashing. That's probably a really bad thing to do, from within > the callback, isn't it? Hah, yes. That's like saw

Re: Question about synchronization and the progress callback

2011-03-18 Thread Ben Noordhuis
On Fri, Mar 18, 2011 at 16:48, Saqib Ali wrote: > I would like to serialize calls to the progress callback in this way. The > action I'm taking in the function takes a significant amount of time. So I'm > seeing overlapping calls to the progress function. To deal with this, I've > inserted a mutex

Re: How to extract a header value from a POST response

2011-03-18 Thread Ben Noordhuis
2011/3/18 Javier Gálvez Guerrero : > However, I do not know how to extract response headers. Should I set any > option to the easy handler? I have read the tutorial but I do not get any > answer to such issue. Any help would be really appreciated. Response headers or response body? You can get the

Re: SMTP authentication methods in API

2011-03-18 Thread Ben Noordhuis
On Fri, Mar 18, 2011 at 10:02, Patricia Muscalu wrote: > Is it on the libucurl's TODO list to expose SMTP authentication methods in > the future release(s)? It's not on the official TODO list so far. > Are there any patches solving this issue > (http://curl.haxx.se/mail/lib-2010-10/0078.html)?

Re: Output to terminal using libcurl

2011-03-17 Thread Ben Noordhuis
On Thu, Mar 17, 2011 at 13:51, Oscar Salvador wrote: > Hi, how are you. > I have a doubt with libcurl. I'm retrieving an image from url, for > example: http://www.jejeje.com/pepe/52.jpg, and i save this in a > memory buffer. This works correctly. > Before retrieve the image, I check if image exist

Re: [GitHub] [smtp + ssl] connect and upgrade asynchronously in multi mode [bagder/curl GH-8]

2011-03-15 Thread Ben Noordhuis
he patches. [1] https://gist.github.com/828613 From 9114e639c4ce06ffc4588f11d90e048e8302512d Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 16 Feb 2011 22:13:10 +0100 Subject: [PATCH 1/2] SMTP in multi mode: use Curl_ssl_connect_nonblocking() when connecting. --- lib/smtp.c | 13 ++--- lib/s

Re: Uploaded unaligned file size

2011-03-15 Thread Ben Noordhuis
On Tue, Mar 15, 2011 at 12:43, michele wrote: > Hi to all! > I have the following problem: > I cannot upload a file to an ftp site. > I receive the following error message: > > FtpCurl: * Remembering we are in dir > "/home/michele/raid0/export/_TEMP_DIR/test20.bin.ftptmp" > FtpCurl: * Uploaded una

Re: http/https POST performance degradation in libcurl-7.21.0

2011-03-11 Thread Ben Noordhuis
On Fri, Mar 11, 2011 at 20:36, Dan Fandrich wrote: > I count 5588 git commits since version 7.16.0. You're free to check them. Just in case the OP decides to go down that route, `git bisect` is your friend here. --- List admin: http:

Re: PHP nuSoap (cURL) vs AXIS server

2011-03-07 Thread Ben Noordhuis
On Mon, Mar 7, 2011 at 12:02, Supporto Tecnico eMax wrote: > I've this problem: an Apache 2 on MS Server and a PHP Script that must to > connect on a https AXIS web service that require certificate > (https://weg.rm.enel.it/axis/rpcEdi.do/urn:SoapEdi?wsdl) > > I've used nuSoap (a class based on cU

Re: Modifying the example source code

2011-02-28 Thread Ben Noordhuis
On Mon, Feb 28, 2011 at 09:34, Tor Arntsen wrote: > Just to pre-answer a question people may ask.. realloc(NULL) works > fine on many architectures. But not on all architectures. To be > perfectly portable we use the malloc(1) trick. Tor, do you happen to know on what platforms or architectures r

Re: Multi interface efficiency woes

2011-02-19 Thread Ben Noordhuis
On Sat, Feb 19, 2011 at 20:24, Michael Fischer wrote: > And until the response is returned, the underlying descriptor will > *always* be writable after it has connected.  But since we have no > knowledge of what's going on with the underlying HTTP transaction, we > ignorantly keep calling curl_mul

[patch] imap + ssl: connect and upgrade asynchronously in multi mode

2011-02-16 Thread Ben Noordhuis
thub.com/828613 From c4185d34e3ebb102f5973762db3b54a190307bd7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 14 Feb 2011 19:41:42 +0100 Subject: [PATCH 1/2] IMAP in multi mode: use Curl_ssl_connect_nonblocking() when connecting. --- lib/imap.c | 11 +-- lib/imap.h |1 + 2 files changed, 10 insertions(+),