cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 502 Proxy Error while POSTing files bigger than 65K

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Aug 2009 16:19:40 +0200 (CEST)

On Mon, 17 Aug 2009, Raghu PV wrote:

> => Daniel, If the client wants to POST/UPLOAD 2MB of data then how many
> bytes are sent in each of the two send() calls? Could you elaborate the
> process how perform() call manages POST for 2MB of bytes?

First you said you're using the read callback, so then you should know that
libcurl will ask your app for 16K of data at a time. Of course your app may
choose to or even be forced to send back less than 16K in each invoke.

When it has gotten data from the app, it will call send() until the entire
buffer it got has been sent off. Then it calls the read callback again to get
more data to send.

Is there even any other way it could work?

-- 
  / daniel.haxx.se
Received on 2009-08-17