Actually this is done automatically. if you call http://.../index.html web2py will use view index.html if you call http://.../index.xml web2py will use view index.xml etc.
Anyway, programmatically you have access to request.extension == 'xml' and request.env which contains the http header + wsgi variables. On Dec 10, 8:12 am, selecta <[email protected]> wrote: > how to do content negotiation with web2py? something like > > def myfkt(): > if reques.header ??? xml: > redirect(URL(r=request, f="myfkt.xml", vars=request.vars, > args=request.args))

