You could implement range support if your client supports them. I don't believe there is content-range support built into libevent, but I wrote my own (can't share, company IP) implementation for libevent. It wasn't that difficult to write. The RFC is pretty clear.
Ryan On Tue, Jan 31, 2017 at 5:37 AM, Viallard Anthony <[email protected]> wrote: > Hi there, > > I use libevent 2.0.22 and I'm trying to send a big file with the HTTP > API client to a HTTP server. But there is a problem. > > I work on a "embedded" device. This device doesn't have so much memory > (128MB) and the free memory available after a boot is about 30MB. When > I send a file, I open it and put its content in a evbuffer. So, when > the file is about a few kilobytes, it goes well but when I try to send > a big file (a 70MB file for example), the device doesn't have the > required memory and the sending fails. > > Is there a way to send a big file by chunks ? I saw on different > documentations I can use the "Expect: 100-Continue" http/1.1 feature. > > I read a little bit the source code of libevent and it doesn't seem to > implement this. Am I correct ? Do you know a guy who did this ? Perhaps > there is a source code or a patch somewhere ? If not, I can work on > this because I really need this "feature". Do you have some advices ? > Perhaps you have already thought about how to implement this, haven't > you ? > > Regards, > Anthony V. > *********************************************************************** > To unsubscribe, send an e-mail to [email protected] with > unsubscribe libevent-users in the body. >
