[webkit-help] file: scheme on Windows?
Russ Schnapp
rls.webkit at schnapp.org
Thu Apr 29 15:16:23 PDT 2010
Bill Cary wrote:
> This might help:
>
> If you are using WinLauncher to test your locally built WebKit.dll and you
> notice it working with http ... it you try WinLauncher again, but this time
> just type in the URL WITHOUT the leading http (e.g. try entering just
> www.google.com) you'll probably notice that WinLauncher will also just
> product an odd blank white rectangle.
>
> If this is true for you, you are probably seeing the same effect that I've
> seen. I suspect that under the hood, it doesn't really understand how to
> parse what you are feeding into webkit unless it starts with http or https,
> etc. So asking it to load file://... etc probably isn't causing it to
> understand what to do. If you are using WinLauncher, if you look at
> WinLauncher.cpp's code you can see that its an incredibly poorly written
> Win32 app. I haven't traced the problem down yet, but it might be simple
> enough to fix directly in WinLauncher.cpp's loadURL method.
I'm using something remotely similar to WinLauncher. It appears that
what's going on is that it's failing to use
MIMETypeRegistry::getMIMETypeForExtension() to determine the proper MIME
type for local files (for http scheme, the server supplies the MIME
type, of course).
When it calls WebView::canShowMIMEType() for, e.g.,
"file://localhost/C:/wherever/SomePhoto.jpg", instead of providing the
correct MIME type ("image/jpeg"), it's asking about
"application/octet-stream" -- which is, of course, not something it
knows how to render.
I'm stymied because the Apple WebKit port is using CoreFoundation
libraries, which are a black box as far as I'm concerned. I can't debug
them -- they're just third-party libraries without symbols or debugging
info, let alone source code...
I'm still plugging away. There must be some way to get it to use the
right MIME type...
>> -----Original Message-----
>> From: webkit-help-bounces at lists.webkit.org [mailto:webkit-help-
>> bounces at lists.webkit.org] On Behalf Of Russ Schnapp
>> Sent: Thursday, April 29, 2010 12:36 PM
>> To: webkit-help at lists.webkit.org
>> Subject: [webkit-help] file: scheme on Windows?
>>
>> I've got a strange problem that I'm trying to track down. I've got
>> WebKit.dll working in my Windows app, more or less. It renders http:
>> scheme URLs just fine. Put that same content on my local filesystem
>> and
>> all I get is a blank white rectangle. I've tried all the variants,
>> e.g., given a file at
>>
>> C:\dir\foo.bar
>>
>> I've tried
>>
>> file://localhost/C:/dir/foo.bar
>> file://localhost/C|/dir/foo.bar
>> file:///C:/dir/foo.bar
>> file:///C|/dir/foo.bar
>>
>> ...all of which work with Safari and Firefox.
>>
>> I'm using WebKit rev 57076.
>>
>> Any suggestions?
>> _______________________________________________
>> webkit-help mailing list
>> webkit-help at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>
>
>
More information about the webkit-help
mailing list