You're right of course. I even do this pretty regularly. Dunno what I was thinking.
Sent from my iPhone On Aug 31, 2011, at 12:48 AM, Jonas Drewsen <[email protected]> wrote: > On 31/08/11 01.17, Sean Kelly wrote: >> On Aug 30, 2011, at 4:14 PM, Sean Kelly wrote: >>> >>> HTTP really isn't the ideal protocol for this sort of thing. By default, >>> the entire file would be in the message body, which isn't really >>> asynchronous. Chunking is an alternative, but there's no way to do this >>> from the client-side, it's purely a server thing. >> >> I stand corrected--it looks like libcurl lets you enable chunking. I will >> say, however, that I've never actually see a chunked upload from a web >> browser, regardless of size. It's kind of interesting that libcurl will do >> this. > > Chunked transfer is only really necessary when you do not know the size in > advance. I doesn't mean that you cannot use asynchronous IO when doing > unchunked transfers. When you know the file size you can just set the file > size in the http header and send the file asynchronously piece by piece. > > /Jonas
