mirage/ocaml-cohttp — pull request #154 by talex5 (2014-07-29 10:15:18+00:00)
Title: Split Fixed uploads into chunks

Instead of reading the entire upload into a single string, we now return one chunk each time the underlying [read] call returns some data. This avoids using large amounts of RAM, hitting the 16 MB string limit on 32-bit systems. It also allows the application to begin processing the data before it has all arrived.

Fixes #153.

Possibly we should also adjust `Chunked` to stream the individual chunks rather than using the uploader's chunk size too, but this is enough to make it work with `curl -T`.