> When I do this sort of RPC, I put the method in a X-RPC-Action header
This choice is enforced by the framework used in the project, so I
cannot change that. However, I can adjust the client-side, such that
the HTTP request headers also contain the method name. The problem is
that I didn't see how uwsgi can route based on request headers.

The doc lists the following criteria for routing:
- host (check HTTP_HOST)
- uri (check REQUEST_URI)
- qs (check QUERY_STRING)
- remote-addr (check REMOTE_ADDR)
- remote-user (check REMOTE_USER)
- referer (check HTTP_REFERER)
- user-agent (check HTTP_USER_AGENT)
- status (check HTTP response status code, not available in the request chain)
- default (default subject, maps to PATH_INFO)

My only option is to put the method into one of the existing fields,
for example the user-agent. This would work, though one could argue
that it is ideologically "ugly". Is there a way to look for a specific
header?




And second, I want to ask for some guidance about the routing itself -
the examples show how I can change the URL to which the request will
be sent. However, my objective is to route the request to a specific
worker process. Is this something that uwsgi can do, in principle?
_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to