1 Nov 2008 14:04
libevent: evhttp_handle_request and evhttp_dispatch_callback
william opensource4you <william.os4y <at> gmail.com>
2008-11-01 13:04:36 GMT
2008-11-01 13:04:36 GMT
Hi all,
I'm looking for a possibility to have only one callback to manage all
those urls:
/static/img/home.jpg
/static/img/banner.jpg
/static/css/style.css
With this sample, I would like to have one callback registered with
"/static/" to manage all of those urls.
Does anyone have an idea ?
Thanks
William
ps:
I've successfully changed evhttp_handle_request wth the following code:
"
void
evhttp_handle_request(struct evhttp_request *req, void *arg)
{
struct evhttp *http = arg;
struct evhttp_cb *cb;
if (req->uri == NULL) {
evhttp_send_error(req, HTTP_BADREQUEST, "Bad Request");
return;
}
(Continue reading)
RSS Feed