Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Nir Soffer
On Nov 20, 2012, at 12:34 AM, Pander wrote: only this works: char buf[1024]; int n; while ((n = evbuffer_remove(req->buffer_in, buf, sizeof(buf))) > 0) { fwrite(buf, 1, n, stdout); } printf("\n"); Because in POST, browsers send the parameters in the request body. For example, this form

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Pander
On 2012-11-19 21:59, Mark Ellzey wrote: > On Mon, Nov 19, 2012 at 10:12:53PM +0200, Nir Soffer wrote: >> On Mon, Nov 19, 2012 at 7:26 PM, Pander wrote: >> >>> Second question is regarding buffer_in in request. I can't seem to find >>> a proper example with helpers to retrieve the POST parameters. >

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Mark Ellzey
On Mon, Nov 19, 2012 at 10:12:53PM +0200, Nir Soffer wrote: > On Mon, Nov 19, 2012 at 7:26 PM, Pander wrote: > > > Second question is regarding buffer_in in request. I can't seem to find > > a proper example with helpers to retrieve the POST parameters. > > > If you want to support the default f

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Nir Soffer
On Mon, Nov 19, 2012 at 7:26 PM, Pander wrote: > Second question is regarding buffer_in in request. I can't seem to find > a proper example with helpers to retrieve the POST parameters. If you want to support the default form encoding (application/x-www-form-urlencoded), you can use evhttp_parse

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Pander
On 2012-11-19 16:47, Mark Ellzey wrote: > On Mon, Nov 19, 2012 at 03:31:17PM +0200, Nir Soffer wrote: >> >> I don't think this is a good example for using libevent (maybe I do not >> understand what it does correctly). >> >> That server creates one event loop for accepting connections, and then one

[Libevent-users] ANN: Libevent 2.1.2-alpha is released!

2012-11-19 Thread Nick Mathewson
Announcing Libevent-2.1.2-alpha === Libevent 2.1.2-alpha is released! This is the second release in the Libevent 2.1 series. As the "alpha" should tell you, this is not a stable release: you should not run it unless you're willing to debug together. If you want a stab

[Libevent-users] ANN: Libevent-2.0.21-stable is released

2012-11-19 Thread Nick Mathewson
Hello, everyone! Announcing Libevent 2.0.21-stable = Libevent 2.0.21-stable is now tagged and released. The package is available from the website at http://libevent.org/ . There are GPG signatures there too; you should probably verify them, to make sure you get t

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Mark Ellzey
On Mon, Nov 19, 2012 at 03:31:17PM +0200, Nir Soffer wrote: > > I don't think this is a good example for using libevent (maybe I do not > understand what it does correctly). > > That server creates one event loop for accepting connections, and then one > event loop for each connection. Since the

Re: [Libevent-users] evhttp client error handling

2012-11-19 Thread Nick Mathewson
On Thu, Nov 15, 2012 at 2:32 AM, Patrick Pelletier wrote: [...] > Not sure what the proper solution is for this, though. I'm not enough of > a sockets expert. Although I'm curious why we need to create the socket > before we've looked up the name. If we looked up the name first, then we > could

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Nir Soffer
On Mon, Nov 19, 2012 at 12:43 PM, Pander wrote: > On 2012-11-16 15:19, Nick Mathewson wrote: > > > > > > > > On Fri, Nov 16, 2012 at 5:49 AM, Pander > > wrote: > > > > Hi all, > > > > I am new to libevent and am wondering what to choose for a > > m

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-19 Thread Pander
On 2012-11-16 15:19, Nick Mathewson wrote: > > > > On Fri, Nov 16, 2012 at 5:49 AM, Pander > wrote: > > Hi all, > > I am new to libevent and am wondering what to choose for a > multi-threated minimal and fast HTTP service that will run custom C