On Mon, 11 Jul 2016 15:18:52 +0900 Tim van der Linden <[email protected]> wrote:
Hi All, Follow up on this: > 1. From the source of uWSGI I could find that these conditions can be > registered using: the uwsgi_register_router_condition() function (as seen > here https://github.com/unbit/uwsgi/blob/master/core/routing.c). However, I > get a compiler warning stating that this function does not exist > (uwsgi_register_router() does exist and I included the uwsgi headers). What > is the approach to register a router condition to be used in "router-if ="? This turned out to be a typo: uwsgi_register_routeR_condition() instead of uwsgi_register_route_condition(). Sorry about that noise. After fixing this the compiler stopped complaining. However my condition named "isfreshfile:" doesn't get exposed to uWSGI as I get the following error : $ unable to find "isfreshfile" route condition While setting the following route rule: route-if = isfreshfile:/tmp/uwsgi_cache${PATH_INFO}file.html static:/tmp/uwsgi_cache${PATH_INFO}file.html So I am still doing something wrong with registering the route condition. I'm currently using the following two calls to attempt to register: void uwsgi_register_embedded_routers(){ uwsgi_register_route_condition("isfreshfile", router_isfreshfile); } struct uwsgi_plugin router_isfreshfile_plugin = { .name = "router_isfreshfile", .on_load = uwsgi_register_embedded_routers, }; Any pointers are greatly appreciated :) > > Roberto De Ioris > > http://unbit.com Cheers, Tim _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
