For my python binding to evhttp (temporarily called fapws2
http://www.opensource4you.com/cgi-bin/gitweb.cgi?p=fapws2;a=summary), I
would like to implement the concept of virtual host.


Is there anyone having expertise with that within libevent ?

I'm thinking to add it within the http structure. Indeed, an uri is always
coupled with a virtual host.
Then the evhttp_dispatch_callback need to check the uri AND the
virtualhost against the HTTP_X_FORWARDED_FOR environment variable (in case
of proxy) or the req->remote_host.
To be backward compatible, an empty virtualhost means that the uri is
always valid.

Unfortunately this is quite invasive within the libevent code. If I'm not
wrong the following calls must be adapted:
evhttp_free
evhttp_set_cb
evhttp_del_cb
evhttp_set_gencb


Does the core developers will accept to port it in the trunk of libevent ?

Is there a better way to do it ?

Thanks

William

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to