[special handling of empty resource selector (i.e. user requests xcap root) Denis Bilenko **20081005132449] { hunk ./xcap/authentication.py 20 +from xcap import __version__ hunk ./xcap/authentication.py 28 +# body of 404 error message to render when user requests xcap-root +# it's html, because XCAP root is often published on the web. +# NOTE: there're no plans to convert other error messages to html. +# Since a web-browser is not the primary tool for accessing XCAP server, text/plain +# is easier for clients to present to user/save to logs/etc. +WELCOME = ('Not Found' + '

Not Found

XCAP server does not serve anything ' + 'directly under XCAP Root URL. You have to be more specific.' + '

' + '
OpenXCAP/%s
' + '') % __version__ + + hunk ./xcap/authentication.py 95 + if not resource_selector or resource_selector=='/': + raise ResourceNotFound(WELCOME) }