Forum Moderators: phranque

Message Too Old, No Replies

Firefox Save As and HTAccess

         

Nacus

11:01 pm on Mar 25, 2008 (gmt 0)

10+ Year Member



I submitted in the Firefox forum, but thought afterwards this one would be more appropriate.

I have a web site that uses HTAccess to protect files from unauthenticated site visitors. The content is in a protected directory, but the pages that have the links to that protected content are publicly available. When I just click on a link before logging in, the authentication dialog appears as expected. However, before logging in, when I right click on the same link and select Save Link As, the authentication dialog does not appear. Instead, the Save As dialog appears and when I try to save the files (which can be fairly large), the Downloads window appears a shows a very fast download. If I open the file with a text editor it says inside that I have to authenticate to before I can get the file I want.

If, before authenticating, I try to download a file with Safari, IE and Opera, I get the expected behaviour: Authentication dialog appears, I log in, then the download starts.

Am I missing something or this this a Firefox issue?

Nacus

1:53 am on Mar 26, 2008 (gmt 0)

10+ Year Member



Is this too dumb a question?

vincevincevince

2:07 am on Mar 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Send out a Content-disposition header to have the content force a save window to appear. Then, you can left click and all will work as you expect.

jdMorgan

1:11 pm on Mar 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This behavior is apparently due to a difference in authentication handling between Firefox and the other browsers when the download process is invoked. It seems that Firefox downloads the 401-Authentication Required page, while the others detect the 401 response, and "kick the focus" back up out of the download routine to the browser window.

You could report this to the Firefox team -- It's an interesting usability problem.

Jim

Nacus

3:33 pm on Mar 26, 2008 (gmt 0)

10+ Year Member



Guys, thank you very much for you help. I really appreciate it.