A plugin can not extend HTTP headers of the main trac site if it is a private trac.
|Reported by:||Owned by:|
I'm trying to make yahoo.com OpenID provider not complain about "fraudulent" sites by implementing OpenID 2.0 XRDS discovery to the th:AuthOpenIdPlugin copy @ http://ideelabor.ee/opensource/log/python-components/authopenidplugin
Discovery requires the 'base URL' of the trac instance (example.com/trac/project1) to have a X-XRDS-Location header pointing to a XML file. I got over the problem of 'tapping' into wiki module by calling irectly the process_request method of WikiModule after I've added the extra header in the tapping request match: http://ideelabor.ee/opensource/changeset/154/python-components/authopenidplugin
A quick test with a public wiki (anonymous has WIKI_VIEW rights) and yahoo.com had success, but trying another project where anonymous users have zero rights, the wiki system raises a permissions error with req.send_error which clears all outgoing headers set before via this hack.
Question: How can I make a plugin emit an extra header on the main page of the trac instance?
Maybe req.send_error should not clear experimental (X-*) headers?