> Hello,
>
> I have configured uWSGI in order to proxy to an http server and, after
> that, transform the response from the http server through the XSLT
> transformation plugin. It works. The relevant config is:
>
> route= ^/
> toxslt:stylesheet=/whatever/template.xslt,content_type=text/html
> route= ^/ proxyhttp:127.0.0.1:8002
>
> With this I am able to XSLT-transform every response from the
> 127.0.0.1:8002 server.
>
> The problem is that I would like to do this *only* when the response is
> a Content-type=text/html (whatever the URL is, i.e. it cannot be done by
> file extension. It must be by the Content-type header of the response)
>
> Is there a way to apply the transformation depending on the response
> from the server?
>
> I also considered using python code to setup the "transformation chain"
> on the fly as the response reaches back to the uWSGI instance, but it is
> poorly documented, I just don't know how to do it. Any idea?
>
> Thank you.
>
> Pablo.
>
>

There is still no way to check response headers (honestly i still need to
find a proper solution). Currently you can only check the HTTP status,
using the error-route chain (it is a routing chain run after the response
generation but before transformations)

This limit is general, so even running custom code in routing handler does
not solve the issue.


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to