Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
> > Appears to be a firewall issue. I made a dummy PHP script that opens > connection and does simple post without curl. So, it hangs like the curl > test. But for some reason only on multipart/form-data posts. Disabling > firewall allows multipart post.. so I think there's not a curl issue here.

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 3:42 PM, Waitman Gobble wrote: > > > On Mon, Mar 7, 2016 at 2:56 PM, Ray Satiro via curl-library < > curl-library@cool.haxx.se> wrote: > >> On 3/7/2016 3:10 AM, Waitman Gobble wrote: >> >>> Thanks for the replies, I will read through them and figure it

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 2:56 PM, Ray Satiro via curl-library < curl-library@cool.haxx.se> wrote: > On 3/7/2016 3:10 AM, Waitman Gobble wrote: > >> Thanks for the replies, I will read through them and figure it out. I >> really appreciate it. >> I didn't post the entire file. >> >> One thing I

Re: Direct HTTP/2 on clear TCP ( h2c )

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Inca R wrote: > Possibly we introduce an option that makes libcurl use HTTP/2 at once over > http:// Is the "option" ready yet ? Nope, no work has been done for that as far as I know. It's open for grabs! -- / daniel.haxx.se

Re: Question about Content-type: multipart

2016-03-07 Thread Ray Satiro via curl-library
On 3/7/2016 3:10 AM, Waitman Gobble wrote: Thanks for the replies, I will read through them and figure it out. I really appreciate it. I didn't post the entire file. One thing I think the problem is in lib/http.c else if(data->set.postfields) expectsend =

Direct HTTP/2 on clear TCP ( h2c )

2016-03-07 Thread Inca R
Hi; This is from: https://curl.haxx.se/docs/http2.html " ... Possibly we introduce an option that makes libcurl use HTTP/2 at once over http:// " Is the "option" ready yet ? We have http/2 already implemented using nghttp2 to proxy between http/1.1 and http/2. nghttp2 supports http/1.1 upgrade

Re: Link between curl_easy handle and connection

2016-03-07 Thread Isaac Boukris
On Mon, Mar 7, 2016 at 3:30 PM, Pierre Brico wrote: > > Hi Isaac, > > To my knowledge, the multi interface allows just you to manipulate several > easy handles at a time (asynchronously) but doesn't give access to the > underlying connection to the server. Am I wrong ?

Re: Link between curl_easy handle and connection

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Pierre Brico wrote: So my problem is that libcurl manages its own connections pool. In this pool, there are connections to the web server 1 and the web server 2 but each virtual user has its HTTP session on one server (there is no replication between web servers). So, for

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 7:17 AM, Waitman Gobble wrote: > On Mon, Mar 7, 2016 at 6:59 AM, Waitman Gobble wrote: >> On Mon, Mar 7, 2016 at 1:54 AM, Daniel Stenberg wrote: >>> On Mon, 7 Mar 2016, Waitman Gobble wrote: >>> I'm still

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Waitman Gobble wrote: At the moment it appears to be stuck in curl_multi_wait() in lib/multi.c What did it send and receive before it got stuck? -- / daniel.haxx.se --- List admin:

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 6:59 AM, Waitman Gobble wrote: > On Mon, Mar 7, 2016 at 1:54 AM, Daniel Stenberg wrote: >> On Mon, 7 Mar 2016, Waitman Gobble wrote: >> >>> I'm still seeing it hang, tomorrow I'll attach to debugger and see what is >>> sticking. >> >>

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 1:54 AM, Daniel Stenberg wrote: > On Mon, 7 Mar 2016, Waitman Gobble wrote: > >> I'm still seeing it hang, tomorrow I'll attach to debugger and see what is >> sticking. > > > If you show us a full program that reproduces the hang we might be able to > tell

Re: Link between curl_easy handle and connection

2016-03-07 Thread Pierre Brico
Hi Isaac, To my knowledge, the multi interface allows just you to manipulate several easy handles at a time (asynchronously) but doesn't give access to the underlying connection to the server. Am I wrong ? Kind regards, Pierre On Mon, Mar 7, 2016 at 9:19 AM, Isaac Boukris

Re: Recommended architecture for streaming over multiple sockets

2016-03-07 Thread Daniel Stenberg
On Wed, 2 Mar 2016, Boutin Maƫl wrote: I'm currently using libcurl to send data over a nginx local server using HTTP POST and transfer-encoding chunked. My application is fed with buffers which i have to send as soon as i get them. These buffers may belong to various endpoints on the nginx

Re: Link between curl_easy handle and connection

2016-03-07 Thread Pierre Brico
Hi Daniel, I've identified the issue I have. The web application I'm benchmarking is located behind a loadbalancer which forwards the requests to 2 different web servers. When a new connection is established between the client and one of the 2 servers, the loadbalancer adds a new cookie (which

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Waitman Gobble wrote: I'm still seeing it hang, tomorrow I'll attach to debugger and see what is sticking. If you show us a full program that reproduces the hang we might be able to tell you why. -- / daniel.haxx.se

Re: HTTPs connection dropped on SSL_ERROR_WANT_WRITE

2016-03-07 Thread Ameya Vaidya (amevaidy)
> > I take it that pipelining is required to trigger this, isn't it? That is correct. > > To me it sounds like a decent way to fix this problem, so please by all means > show us your take! > --- curl-7.47.1.orig/lib/http.h 2016-02-02 15:02:44.0 -0800 +++ curl-7.47.1/lib/http.h

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 1:26 AM, Waitman Gobble wrote: > On Mon, Mar 7, 2016 at 1:15 AM, Daniel Stenberg wrote: >> On Mon, 7 Mar 2016, Waitman Gobble wrote: >> >>> I've tried with and without Content-Length header. >>> Without adding the header it was sending

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 1:15 AM, Daniel Stenberg wrote: > On Mon, 7 Mar 2016, Waitman Gobble wrote: > >> I've tried with and without Content-Length header. >> Without adding the header it was sending 172 bytes, which I believe is >> due to strlen() > > > Test 1531 tests pretty much

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Waitman Gobble wrote: I've tried with and without Content-Length header. Without adding the header it was sending 172 bytes, which I believe is due to strlen() Test 1531 tests pretty much exactly this and it works fine. What libcurl version are you using? -- /

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 12:53 AM, Daniel Stenberg wrote: > On Mon, 7 Mar 2016, Waitman Gobble wrote: > >> Sorry, original post doesn't show but i did add it in >> long post_size; >> post_size = ftell(fp); >> >> curl_easy_setopt(conn, CURLOPT_POSTFIELDSIZE, post_size); > > > But you

Re: Link between curl_easy handle and connection

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Isaac Boukris wrote: I currently have a similar requirement and I'm testing the approach of coupling each easy handle with its own multi handle (using curl_multi_socket_action). Oh right, that should be doable. It works ok so far, though I wonder how well it would scale

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Waitman Gobble wrote: Sorry, original post doesn't show but i did add it in long post_size; post_size = ftell(fp); curl_easy_setopt(conn, CURLOPT_POSTFIELDSIZE, post_size); But you overrode that value yourself in the request: std::string cl = "Content-Length: " +

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 12:31 AM, Daniel Stenberg wrote: > On Mon, 7 Mar 2016, Daniel Stenberg wrote: > >>> One thing I think the problem is in lib/http.c >>> >>> else if(data->set.postfields) >>>expectsend = (curl_off_t)strlen(data->set.postfields); >> >> >> Hm. That

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Waitman Gobble wrote: I pulled curl from git, and changed http.c to check for data->set.postfieldsize , getting ready to test i'll let you know. That's not your problem. Read the rest of the function where 'expectsend' is used and you'll notice that isn't used for your

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 12:25 AM, Daniel Stenberg wrote: > On Mon, 7 Mar 2016, Waitman Gobble wrote: > >> One thing I think the problem is in lib/http.c >> >> else if(data->set.postfields) >>expectsend = (curl_off_t)strlen(data->set.postfields); > > > Hm. That doesn't

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Daniel Stenberg wrote: One thing I think the problem is in lib/http.c else if(data->set.postfields) expectsend = (curl_off_t)strlen(data->set.postfields); Hm. That doesn't look right... That said, your use case won't trigger any problem because of that as

Re: Question about Content-type: multipart

2016-03-07 Thread Daniel Stenberg
On Mon, 7 Mar 2016, Waitman Gobble wrote: One thing I think the problem is in lib/http.c else if(data->set.postfields) expectsend = (curl_off_t)strlen(data->set.postfields); Hm. That doesn't look right... -- / daniel.haxx.se

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Mon, Mar 7, 2016 at 12:10 AM, Waitman Gobble wrote: > On Sun, Mar 6, 2016 at 11:43 PM, Ray Satiro via curl-library > wrote: >> On 3/7/2016 1:15 AM, Waitman Gobble wrote: >>> >>> When I set Content-Type header to multipart/form-data and add data

Re: Link between curl_easy handle and connection

2016-03-07 Thread Isaac Boukris
Hi, On Mon, Mar 7, 2016 at 1:15 AM, Daniel Stenberg wrote: > On Sun, 6 Mar 2016, Pierre Brico wrote: > >> So my question is: is it possible to link one connection to one CURL >> handle (no pool usage)? > > > In theory it should be fairly easy to have each easy handle use its own

Re: BoringSSL crash on Win32

2016-03-07 Thread Gisle Vanem
Daniel Stenberg wrote: > On Fri, 4 Mar 2016, Gisle Vanem wrote: > >> I'm built libcurl using BoringSSL (MSVC-2015) but it crashes for a very good >> reason. Here is the call-stack (slightly >> edited): > > David Benjamin in the BoringSSL team produced a patch for this problem and > it'd be

Re: Question about Content-type: multipart

2016-03-07 Thread Waitman Gobble
On Sun, Mar 6, 2016 at 11:43 PM, Ray Satiro via curl-library wrote: > On 3/7/2016 1:15 AM, Waitman Gobble wrote: >> >> When I set Content-Type header to multipart/form-data and add data to >> CURLOPT_POSTFIELDS it seems to hang. I thought maybe proxy issue but >> tried