On 02 Feb 09, at 02:32, Valentin Dan wrote:
I have paths like: \\10.1.1.11\SomeFolder\FileName.jpg
<file:///\\10.1.1.11\SomeFolder\FileName.jpg> . I tested the path on
Windows in InternetExplorer and it pops up a Login dialog. After
authentication the picture is loaded and all further requests are ok.
How can I get this behavior on Mac (Firefox / Safari / any other
browser)?

Short version: You can't.

<file:///\\10.1.1.1\SomeFolder\FileName.jpg> isn't a valid file: URI; the fact that it works in Internet Explorer on Windows is more by mistake than by design. You can create smb://share/path URIs that ALMOST work similarly, but they aren't recognized by the URL Loading framework or by Firefox.

If you're feeling particularly adventurous, you can try writing your own NSURLProtocol subclass to handle these types of URIs natively. However, note that:

1. Your code doesn't affect other applications, so Safari (and other browsers) won't gain the benefit of your subclass without ugly hacks.

2. Your code won't affect Firefox at all, because it uses its own URL loading framework.

3. Samba is ugly code. Massively, incredibly ugly. It is not fun to work with. However, you'll probably have to dig deep into it to implement this sort of thing. Have fun.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to