Safari download via symbolic link fails

Posted:
in Genius Bar edited January 2014
This is a weird one I honestly don't expect an answer to, but I'll throw it out anyway at least for the strangeness of it.



Running Safari 3.2.1 on 10.5.5 (all updates, no nightlies or haxies or anything non-standard.) I have a remote linux server with some music on it. I can download the music no problem when linking directly to it. But I don't want the music exposed, so I keep it outside of the web root and I request a .php script through safari that does some authentication. The php script then makes a random named directory under the web root and creates a symlink inside that directory pointing to the music file, and then redirects safari to the symlink. This used to work fine, and it still works fine in Firefox. In Safari I can request the php script and it will stream the file to the browser, but if I link to the php script and do a right click 'Save linked file to Downloads...' it fails!



How can a file stream fine to Safari, but fail when you try to save instead of playing it in your browser? That's something that a lot of developers would actually want to do! But it shouldn't happen that way (and I don't want it happening that way.)



Any ideas?

Comments

  • Reply 1 of 4
    Are you using Referrer to do the authentication? From my experience, using right-click to download something in Safari will cause it not to send Referrer information to the server. Don't know if it helps, but it's my two cents.
  • Reply 2 of 4
    Quote:
    Originally Posted by afx5i View Post


    Are you using Referrer to do the authentication? From my experience, using right-click to download something in Safari will cause it not to send Referrer information to the server. Don't know if it helps, but it's my two cents.



    Thanks for the reply. And that's interesting information that may help me somewhere else. But no, I'm not using the referrer for auth at all. I'm surprised I can't figure this one out.
  • Reply 3 of 4
    And hey: nice blog. I'm subscribed.
  • Reply 4 of 4
    Quote:
    Originally Posted by d.mantic View Post


    And hey: nice blog. I'm subscribed.



    Thanks. Always good to hear people like what I write.



    I'm still thinking about your question, because it sounds very special to me when Firefox works but Safari doesn't. I wouldn't be surprised if it's something AJAX, but as you've said, it's just loading a URL! Do you think it has something to do with spaces or other special characters in the filename?
Sign In or Register to comment.