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

Re: [Libevent-users] http server and infinite streams



I second this... I hacked my local version to do this, then realized the
application was depending on each chunk being newline-terminated (ie
logically complete chunk). I suspect I'm not unique in this need, so we
may want some way for the chunked callback to return the number of
characters it used so that we only drain that many.

Brian

On 4/26/11 1:49 PM, "Cliff Frey" <cliff@xxxxxxxxxx> wrote:

>Also, a completely different bug:  If you want to support potentially
>infinite POST streams from clients (imagine that you wanted to
>implement word-count as an http server, where they POST a document,
>and you return the word count) then clients can run your server out of
>memory by sending one very large chunk.  I think that the
>evhttp_request_set_chunked_cb callback should be called on every read,
>not just when a complete HTTP chunk has been read.  I have made a
>patch that does this, but I worry that maybe some user out there
>depends on the only-read-complete-http-chunk behavio

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