John-Mark Bell jmb at
Thu Jul 31 19:19:37 BST 2008

On Thu, 31 Jul 2008, Chris Young wrote:

> On Thu, 31 Jul 2008 18:33:31 +0100 (BST), John-Mark Bell wrote:
>> All paths passed up from the core will be in Unix format (as it basically
>> just strips the scheme + authority off the front). Thus, fetch_filetype()
>> should be expecting a Unix path.
> So it does (I just copied the debug code for this routine without
> looking at it).  I can fix that at my end then, but that doesn't help
> if the path is wrong when fetching files.

Actually, what I wrote above isn't entirely accurate. The core simply 
passes around whatever you pass it, adding or stripping "file://" as 
appropriate (Yes, two slashes -- the third is assumed to be the start of 
the path segment, as per the URI spec).

> (I really, really, don't want to enable UNIX path compatibility, I'd
> rather work out a way to use native paths)

On RISC OS, our runtime library performs this conversion transparently. 
Your alternative would be to implement a platform-specific handler for 
file: URLs. Then you can do whatever you like.

See content/fetchers/fetch_*.c for existing fetch handlers. I think 
there's also one in beos/, as that has some slightly different 
requirements, too.

Overall, this seems far cleaner that changing NetSurf's core + the 
underlying fetch library (cURL) to gain support for specific platforms).


More information about the netsurf-dev mailing list