views:

574

answers:

2

I'm using Apache 2 and have a custom 401 page, in httpd.conf

ErrorDocument 401 /error/unauthorized.html

When I access a protected resource, all browsers show the basic http authentication dialog. If I click "cancel", all browsers but Safari (v3 and v4) will display the custom 401 page. Safari just displays the current page.

Is there any way to get Safari to display the 401 page through Apache configuration and/or mod_perl handlers?

+1  A: 

G'day,

I believe that this is a well known issue for Safari browsers. In fact, several aspects of HTTP Authentication are subject to a "special" Apple implementation.

Sorry I can't give you a quick workaround.

cheers,

Rob Wells
A: 

I can't reproduce the error in Safari 4 Beta, but try adding some bytes in your unauthorized.html file. Some versions of IE wouldn't show custom error pages unless the page was over a certain size, it assumed small pages were the default non-useful pages and tried to show something more useful (aka confusing).

Adam Backstrom
I've tested with Safari 4.0 (on Mac), and the behavior is still the same.
Grant