[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Send big file with libevent http module



On Tue, 31 Jan 2017 15:26:24 +0100
Reindl Harald <h.reindl@xxxxxxxxxxxxx> wrote:

> normally large static files should not make it to the memory at all
> https://linux.die.net/man/2/sendfile
> 

Hi Harald,

Actually, I send the file in a "multipart/form-data" http message
because I need to send other informations at the same time. So, I fill
an evbuffer with differents values and the file separated by a
delimiter. I open the file and I read/write 5KB to the evbuffer.

Therefore, I don't think I use sendfile() and this is why I have this
memory problem. Maybe if I use an other kind of http message instead of
"multipart/form-data", put the values from the http body to the query
string and use the function evbuffer_add_file(), I can hope not having
this issue ?

> Am 31.01.2017 um 14:11 schrieb Ryan Daum:
> > 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.

Hi Ryan,

Thanks for the suggestion. I am reading about that.

Regards,
Anthony.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.