eXist-db/exist — pull request #133 by Infiniverse (2014-01-27 07:52:28+00:00)
Title: When RESTXQ detects a security error, it should not fail with a 500.

Instead initiate a basic auth handshake (401), so that the
user can retry the request with the correct level or authorisation.