[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] http server and infinite streams
>> https://github.com/clifffrey/Libevent/tree/http-transfer-throttling
>>
>> I believe that the changes there are enough to prevent out-of-memory
>> conditions when sending or receiving huge HTTP requests.
>
> Great; I will try to review and either merge or comment some time this
> week. Please bug me if I don't! (My apologies if I'm slow; things
> are busy in my day job and family life this week. Good, but still
> busy!)
(First of all, I'd just like to say "Hi", as this is my first message
to the list.)
This patch series still leaves the case "I'm a HTTP server and I want
to receive infinite number of bytes from a client as a POST body"
unsolved, which I think is very much related (and also mentioned in
https://github.com/clifffrey/Libevent/commit/8920bee1339d2cf3ef286f36772620f481f8af13)
I got inspired of Mark Ellzey's commits (mentioned earlier in this
thread), and implemented a new (optional) handling of sent body data
as https://github.com/vboivie/Libevent/commit/ecca80b4f50f8ec8b13cdc6cfa5d19db80cd5d08
and I'd just want to send this out to get the crowd's immediate
feedback.
The API might seem a bit high-level as it has several callbacks which
avoids the client to keep track of the state (as other solutions do)
and that might be unorthodox in libevent. The most important aspect in
any case is that we have to make sure that the implementing
application is notified if an ongoing incoming HTTP request is
cancelled while sending body data (i.e. without issuing the request
callback) so that it can free the partially received body data.
I suppose you want tests to be implemented before you continue, but
please let me know if there are any chances of this being accepted
before I invest in that. Thanks.
Best regards,
Victor
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.