[Libevent-users] libevent-1.4.0 beta released
william at opensource4you.com
william at opensource4you.com
Fri Jan 4 09:48:22 EST 2008
First of all happy new year to all ;-).
Second, sorry for the delay, but free time is more and more difficult to
find.
I propose here a patch for "evhttp_dispatch_callback" that allow him to
treat wild char in registered uri.
(patch is based on libevent-1.4.1-beta)
in attach you will find a test: "libevent-test.c" that will implement such
uri.
In the sample, I register "/test*" to the function "callback_http_index".
That means that this function will be triggered when the browser will
request the uri /test/12345/read (for example).
This give much more flexibility.
Thanks
> Hi William,
>
> I think the most straightforward approach is to extend the set
> callback mechanism to accept a wild card character such as *. I will
> take a look at it. For now, progress is tracked in the source forge
> tracker.
>
> Niels.
>
> On Nov 12, 2007 12:55 AM, <william at opensource4you.com> wrote:
>> I'm no more able to use my wsgi python binding to libevent, because the
>> evhttp_dispatch_callback ( or evhttp_handle_request) function is now
>> static.
>>
>> Indeed, as I've mentioned in my mail of "Sun, October 14, 2007 10:22
>> am",
>> I've been forced to update this function.
>>
>> Because the function is not static, I'm able, with libevent-1.3 able to
>> over-write it in my own code:
>> Line 46 here
>> http://www.opensource4you.com/cgi-bin/gitweb.cgi?p=fapws2;a=blob;f=fapws2/_evhttp.c;h=eb0cd0aebcb31b48874842335575827b89091596;hb=05ec30b72f106120d1aa2c7913ba609a1a1fe4a4
>> This is no more possible with libevent-1.4.
>>
>>
>> Thanks to provide possibilities for extension like mine.
>> Or, if I'm not using libevent as it should be, thanks to provide me a
>> better way.
>>
>>
>> Thanks
>>
>>
>> PS:
>> I remind here that my goal is to call a callback based on the start of
>> the
>> url. For example, if I have a callback associated to the url:/static/,
>> all
>> the following urls will trigger this call back:
>> /static/img/logo.png
>> /static/css/main.css
>> /static/js/hello.js
>>
>> As specified in the wsgi specs ( www.wsgi.org), and url is composed of
>> different elements:
>> url = quote(environ.get('SCRIPT_NAME',''))
>> url += quote(environ.get('PATH_INFO',''))
>> if environ.get('QUERY_STRING'):
>> url += '?' + environ['QUERY_STRING']
>>
>> In my first example associated variable will be:
>> environ['SCRIPT_NAME']="/static/",
>> environ["PATH_INFO"]="img/logo.png", and
>> environ["QUERY_STRING"]="".
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > Hi everyone,
>> >
>> > I am pleased to announce the release of libevent-1.4.0-beta. This
>> > release contains major new features:
>> >
>> > - RPC subsystem that makes it easy to write distributed servers and
>> > clients
>> > - almost everything is documented via Doxygen now
>> > - many fixes and improvements to evdns and evhttp
>> > - libevent now builds two additional libraries: libevent_core
>> > (containing only the event core) and libevent_extras (contained evdns,
>> > evhttp and evrpc)
>> > - performance improvements due to using a heap instead of red-black
>> > trees for timeouts
>> > - Solaris' event ports are better supported
>> >
>> > Plus many other fixes - see the ChangeLog file for more details.
>> >
>> > You can download libevent from
>> >
>> > http://www.monkey.org/~provos/libevent/
>> >
>> > I would like to thank Charles Kerr, Christopher Layne, Hannah
>> > Schroeter, Lubomir Marinov, Magne Mahre, Mark Heily, Maxim
>> > Yegorushkin, Nick Mathewson, Prakash Sangappa and Trond Norbye for
>> > their help.
>> >
>> > If you encounter any problems or would like to submit patches, let
>> > either Nick Mathewson or myself know or use the tracker at:
>> >
>> > https://sourceforge.net/tracker/?group_id=50884
>> >
>> > Thanks,
>> > Niels.
>> > _______________________________________________
>> > Libevent-users mailing list
>> > Libevent-users at monkey.org
>> > http://monkeymail.org/mailman/listinfo/libevent-users
>> >
>> >
>>
>>
>>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: handle_wildchar.patch
Type: text/x-patch
Size: 879 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20080104/8d435795/handle_wildchar.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-test.c
Type: text/x-csrc
Size: 1357 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20080104/8d435795/libevent-test.bin
More information about the Libevent-users
mailing list