Re: PHP/cURL: intensive calls send exception without caching connection resource

2014-01-13 Thread Stéphane HULARD
Daniel, Thanks for your answer. As I read your questions, I think my problem details are unclear about the environment and my curl utilisation. First I need to clarify some point, I did not know that your bug tracker is on SourceForge. I searched for my problem on Guzzle github issues and

Re: HTTP POST: fail early if unknown data size (read function)

2014-01-13 Thread Cédric Deltheil
Le 12 janv. 2014 à 22:20, Rich Gray rg...@plustechnologies.com a écrit : Although it is probably the closest code for this error, CURLE_UPLOAD_FAILED seems wrong. In my mind, it implies a wire error, Just a precision: the corresponding error string is Upload failed (at start/before it took

libcurl hangs in SSL handshake

2014-01-13 Thread sachin dravid
Hello, I am getting few sockets hangs in SSL handshaking. I am using curl multi interface for HTTP protocol. Curl logs: == 08:05:04.208 == Info: Found bundle for host xyz.com: 0x11adaa0 08:05:04.208 == Info: About to connect() to xyz.com port 443 (#2731) 08:05:04.208 == Info:

Re: HTTP POST: fail early if unknown data size (read function)

2014-01-13 Thread Daniel Stenberg
On Sun, 12 Jan 2014, Cédric Deltheil wrote: I compared what happens with an HTTP PUT request if the caller forgot to set the expected size via `CURLOPT_INFILESIZE`: in that case, the Content-Length header is omitted (and thus libcurl does not send any negative Content-Length). Ah yes. Since

Re: libcurl hangs in SSL handshake

2014-01-13 Thread Daniel Stenberg
On Mon, 13 Jan 2014, sachin dravid wrote: I am getting few sockets hangs in SSL handshaking. I am using curl multi interface for HTTP protocol. I'm not sure I understand your definition of hang here. Are you referring to a socket that libcurl owns that you won't get any notifications about

[PATCH] Sensible error message on timeout when transfer size unknown

2014-01-13 Thread Colin Hogben
I noticed with version 7.33.0 of libcurl I was getting error messages such as Operation timed out after 2003 milliseconds with 0 out of -1 bytes received when using the multi interface. The out of -1 makes no sense. This seems to be a regression since 7.16.2 (ancient, I know! - but stable

Re: [PATCH] Sensible error message on timeout when transfer size unknown

2014-01-13 Thread Daniel Stenberg
On Mon, 13 Jan 2014, Colin Hogben wrote: I noticed with version 7.33.0 of libcurl I was getting error messages such as Operation timed out after 2003 milliseconds with 0 out of -1 bytes received when using the multi interface. The out of -1 makes no sense. This seems to be a regression since

curlopts_writedata not being passed to writefunction properly.

2014-01-13 Thread Joshua Kordani
This was originally posted to the curl-users group, and I was encouraged to post here instead. http://paste.lisp.org/display/140893 annotation 1 is a single code file listing that should compile, (you just need to link curl) annotation 2 is the output I get of running that code on a test

Re: libcurl hangs in SSL handshake

2014-01-13 Thread sachin dravid
On Mon, Jan 13, 2014 at 8:52 PM, Daniel Stenberg dan...@haxx.se wrote: On Mon, 13 Jan 2014, sachin dravid wrote: I am getting few sockets hangs in SSL handshaking. I am using curl multi interface for HTTP protocol. I'm not sure I understand your definition of hang here. Actually the

MSVC SSL Package Questions

2014-01-13 Thread Tacker Timothy-FVB738
I would like to use libcurl with SSL support in Microsoft Visual Studio 2013. 1. Is it correct that the following MSVC packages are intended for use in Visual Studio? http://curl.haxx.se/dlwiz/?type=develos=Win32flav=MSVC Also, I note that for the libcurl-7.19.3-win32-ssl-msvc.zip package, the

Re: curlopts_writedata not being passed to writefunction properly.

2014-01-13 Thread Joshua Kordani
The issue is solved. With the specification of the writeheader (with headerfunction unset), when reading headers, the writefunction was used with the writeheader as userdata, not writedata. On 1/13/14 3:37 PM, Dan Fandrich wrote: On Mon, Jan 13, 2014 at 11:21:41AM -0500, Joshua Kordani

correct usage of curl_multi_setopt(_multi, CURLMOPT_SOCKETFUNCTION, _sock_cb); / curl_multi_remove_handle / curl_easy_cleanup

2014-01-13 Thread svante karlsson
I've combined boost asio with libcurl to build a async http client library. However I'm thinking I might have misunderstood the callback sequence or the usage pattern. int http_client_async_handler::sock_cb(CURL *e, curl_socket_t s, int what, void* per_socket_user_data) { ... switch (what) {

Re: libcurl hangs in SSL handshake

2014-01-13 Thread sachin dravid
On Mon, Jan 13, 2014 at 10:29 PM, sachin dravid sachin.drav...@gmail.comwrote: On Mon, Jan 13, 2014 at 8:52 PM, Daniel Stenberg dan...@haxx.se wrote: On Mon, 13 Jan 2014, sachin dravid wrote: I am getting few sockets hangs in SSL handshaking. I am using curl multi interface for HTTP

Re: libcurl hangs in SSL handshake

2014-01-13 Thread Daniel Stenberg
On Tue, 14 Jan 2014, sachin dravid wrote: This issue is almost similar to http://curl.haxx.se/mail/lib-2008-04/0276.html That won't help us much though, as it is almost six years old and we fixed it there and then as you can see in the mail thread... Can you spot any pattern in which

RE: correct usage of curl_multi_setopt(_multi, CURLMOPT_SOCKETFUNCTION, _sock_cb); / curl_multi_remove_handle / curl_easy_cleanup

2014-01-13 Thread Yehezkel Horowitz
int http_client_async_handler::sock_cb(CURL *e, curl_socket_t s, int what, void* per_socket_user_data) ... curl_multi_remove_handle(_multi, e);  // IF I CALL THIS THEN WE CRASH IN LIBCURL   (A) ...                                    //