Backport Accept check from chttpd to correctly handle when browser
try to access a database when they aren't logged in or need to change
their login