Hi Olli!
"If the ErrorDocument specifies a local redirect to a CGI script, the script should include a "Status:" header field in its output in order to ensure the propagation all the way back to the client of the error condition that caused it to be invoked."
http://httpd.apache.org/docs/custom-error.html unten
Also mal "Status: 401 Not Authorized\n" ausgeben und schauen, ob's klappt.
HTH, So long