Difference between revisions of "URI/File scheme/Plan of action"

From Offset
Jump to navigationJump to search
(moving content from URI/File scheme, which will now be just an intro and portal)
 
m (Browsers: change IE's "other" behaviour)
 
(22 intermediate revisions by 8 users not shown)
Line 1: Line 1:
= Plan of action for updating the 'file' URI scheme =
+
This is the plan of action for updating the 'file' URI scheme. It is part of the W3C URI Interest Group's [[URI/File scheme|'file' URI scheme update project]].
  
== Survey implementations of file: URIs ==
+
== Approach ==
 +
 
 +
There is disagreement over how prescriptive the specification should be, but the general approach taken by the IETF in the past has always leaned toward ''document what works'' moreso than ''fix what's broken.'' The chapter "[http://www.faqs.org/docs/artu/ietf_process.html IETF and the RFC Standards Process]", from ''The Art of Unix Programming'' by Eric Steven Raymond, emphasizes that Internet RFCs and standards tend to be based more on actual implementation than pie-in-the-sky theory.
 +
 
 +
Therefore, we are starting with a survey of implementations, and will then provide guidelines that emphasize interoperability.
 +
 
 +
=== Survey implementations of file: URIs ===
  
 
What do they implement? How do they map file: URIs to various operating system special situations, including handling of character set transformations, inclusion of drive letters, remote mount directories, individual mount points, symbolic links or redirections?
 
What do they implement? How do they map file: URIs to various operating system special situations, including handling of character set transformations, inclusion of drive letters, remote mount directories, individual mount points, symbolic links or redirections?
Line 7: Line 13:
 
What is useful common practice for getting interoperable results when creating file: URIs?
 
What is useful common practice for getting interoperable results when creating file: URIs?
  
Based on this, update the Proposed Standard for file: URIs to be consistent with common current practice.
+
=== Recommend useful practice based on implementations ===
 +
 
 +
Based on the survey of implementations, recommend action:
  
— [[User:Lmm|Lmm]] 09:35, 21 Jun 2005 (MDT)
+
* What should URI creators write for file: URIs to be interoperable with most current implementations
 +
* What should (new or updated) file: URI interpreters do to handle the diversity of file URIs likely to be seen
 +
* Update the Proposed Standard for file: URIs to be consistent with common current practice, such that progression to Draft Standard (multiple, independent, interoperable implementations) is likely.
  
Robert Herriot proposes:
+
== List of implementations to Survey ==
  
Here is my quick [[Wikipedia:en:List of web browsers|list of browsers]] that I think we should cover:
+
=== Browsers ===
 +
Here is a [[Wikipedia:en:List of web browsers|list of browsers]] that we should cover (add to it if you feel something is missing):
 +
 
 +
*[[Wikipedia:en:Mozilla Firefox|Firefox]]: Windows 8/7 (maybe Windows XP), Mac OS X, Linux
 +
**Version 26.0 on Windows XP:
 +
***empty authority: local file system
 +
***"localhost" authority: rewritten so authority is empty
 +
***authority is a drive letter: rewritten so authority is empty and drive letter is part of path
 +
***drive letter with a pipe: interpreted as drive letter
 +
***[[Wikipedia:en:Path (computing)#UNC_in_Windows|UNC]]:
 +
****<tt>file://///authority/path</tt> &rarr; <tt>\\authority\path</tt>, ''path'' must be non-empty
 +
***other: URL is ignored completely
 +
 
 +
*<s>[[Wikipedia:en:Netscape Browser|Netscape]]</s>: same as above
 +
 
 +
*<s>[[Wikipedia:en:Mozilla Application Suite|Mozilla Suite]]</s>: same as above (future versions will be released as [[Wikipedia:en:SeaMonkey|SeaMonkey]], by an independent group from the Mozilla Foundation)
 +
**Version 1.8b on Windows XP:
 +
***empty authority: local file system
 +
***"localhost" authority: local file system
 +
***authority is a drive letter: rewritten so authority is empty and drive letter is part of path
 +
***other: treated like "localhost"
  
*[[Wikipedia:en:Mozilla Firefox|Firefox]]: Windows 2000/XP, maybe Windows 98, Mac OS X, Linux (I hope one flavor is enough)
 
*[[Wikipedia:en:Netscape Browser|Netscape]]: same as above
 
*[[Wikipedia:en:Mozilla Application Suite|Mozilla]]: same as above (there is a new version, even though I thought that Firefox was supposed to replace Mozilla)
 
 
*[[Wikipedia:en:Opera (web browser)|Opera]]: same as above
 
*[[Wikipedia:en:Opera (web browser)|Opera]]: same as above
*[[Wikipedia:en:Windows Explorer|Windows Explorer]]: same Windows OSs as above. I assume there is no support for Mac OS X or Linux
+
**(see [[Opera URI note]])
 +
**Version 12.16 on Windows XP:
 +
***empty authority: rewritten so authority is "localhost"
 +
***"localhost" authority: local file system
 +
***authority is a drive letter: rewritten so authority is "localhost" and drive letter is part of path
 +
***drive letter with a pipe: rewritten with a colon
 +
***[[Wikipedia:en:Path (computing)#UNC_in_Windows|UNC]]:
 +
****<tt>file://authority/path</tt> &rarr; <tt>\\authority\path</tt>, ''path'' must be non-empty
 +
***other: rewritten so authority is "localhost" and first path segment is "C:"
 +
 
 +
*[[Wikipedia:en:Lynx (web browser)|Lynx]]: character mode browser, same as above
 +
**Version 2.8.5rel.2 on Cygwin on Windows XP:
 +
***drive letters not understood on Cygwin, but <tt>/cygdrive/c</tt> is
 +
***note ''anomaly'': if no trailing slash after authority, path is treated as "." rather than "/"
 +
***empty authority: local file system
 +
***"localhost" authority: local file system
 +
***other: file URI is treated as ftp URI
 +
 
 +
*[[Wikipedia:en:Links (web browser)|Links]]: character mode browser, same as above
 +
**Version 0.99pre14 on Cygwin on Windows XP:
 +
***drive letters not understood on Cygwin, but <tt>/cygdrive/c</tt> is
 +
***empty authority: local file system
 +
***other: error
 +
 
 +
*[[Wikipedia:en:W3m|W3m]]: character mode browser, same as above
 +
**Version 0.5.1 on Cygwin on Windows XP:
 +
***drive letters not understood on Cygwin, but <tt>/cygdrive/c</tt> is
 +
***empty authority: local file system
 +
***"localhost" authority: local file system
 +
***other: error
 +
 
 +
*[[Wikipedia:en:Internet Explorer|Internet Explorer]]: same Windows OSs as above; Internet Explorer on Macintosh. (No Linux)
 +
**Version 8.0 on Windows XP:
 +
***empty authority: local file system (opens in Windows Explorer)
 +
***"localhost" authority: local file system (opens in Windows Explorer)
 +
***authority is a drive letter: local file system (opens in Windows Explorer)
 +
***drive letter with a pipe: interpreted as drive letter
 +
***[[Wikipedia:en:Path (computing)#UNC_in_Windows|UNC]]:
 +
****<tt>file://authority/path</tt> &rarr; <tt>\\authority\path</tt>, ''path'' may be empty
 +
****<tt>file:////authority/path</tt> &rarr; <tt>\\authority\path</tt>, ''path'' may be empty
 +
****<tt>file://///authority/path</tt> &rarr; <tt>\\authority\path</tt>, ''\path'' may be empty
 +
***other: error
 +
 
 
*[[Wikipedia:en:Safari (web browser)|Safari]]: Mac OS X
 
*[[Wikipedia:en:Safari (web browser)|Safari]]: Mac OS X
 +
 
*[[Wikipedia:en:Konqueror|Konqueror]]: Linux (KDE)
 
*[[Wikipedia:en:Konqueror|Konqueror]]: Linux (KDE)
 +
 
*[[Wikipedia:en:Galeon|Galeon]]: Linux (Gnome)
 
*[[Wikipedia:en:Galeon|Galeon]]: Linux (Gnome)
  
There are a few more browsers that I have found, but I think the list above covers the major browsers and perhaps a few minor ones.
+
The list above covers the major browsers and a few minor ones. We should focus on the latest of each; perhaps some older versions with a large installed base should be included.
 +
 
 +
=== Non-Browser Implementations ===
 +
 
 +
* Windows API
 +
** [http://msdn.microsoft.com/en-us/library/windows/desktop/bb773581(v=vs.85).aspx PathCreateFromUrl function]
 +
** [http://msdn.microsoft.com/en-us/library/windows/desktop/bb773773(v=vs.85).aspx UrlCreateFromPath function]
 +
* [http://search.cpan.org/~gaas/libwww-perl-6.05/lib/LWP.pm libwww-perl]
 +
** [http://cpansearch.perl.org/src/GAAS/libwww-perl-6.05/lib/LWP/Protocol/file.pm LWP::Protocol::file]
 +
 
 +
=== File Systems ===
 +
Here is a [[Wikipedia:en:List of file systems|list of file systems]] we should acknowledge. Each has different limitations in what characters it can support and how it stores them; this may affect how file: URIs are constructed and interpreted. Perhaps a matrix of how each browser interacts with each file system native to its platform would be useful:
 +
 
 +
* FAT32 (popular on older Windows systems)
 +
* NTFS (popular on newer Windows systems)
 +
* ext2, ext3, ReiserFS, Reiser4 (popular on Linux systems)
 +
* UFS (popular on BSD and Mac OS X systems)
 +
* ISO 9660, Joliet, Rock Ridge, ISO 13490 (popular on CD-ROMs)
 +
* HFS+ (popular on older Mac OS systems)
 +
 
 +
=== Further Reading ===
 +
Further reading on file systems and encodings:
 +
 
 +
* [[Wikipedia:en:Comparison of file systems|Comparison of file systems]] on Wikipedia covers a lot of ground, and links to separate articles about each file system. Check the discussion page as well.
 +
* [http://osdev.berlios.de/osd-fs.html File system info by Chris Giese] in addition to providing various FAT technical details, gives additional details about encodings, legal characters, and limitations of FAT12, FAT16, VFAT, FAT32, NTFS, ext2, ISO9660, Joliet, and HFS+
 +
* [http://publib.boulder.ibm.com/infocenter/adiehelp/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/concepts/ccor_ipgmc8c.html This page] from IBM's WebSphere CORBA documentation is an example of an implementation expecting to see "<code>:</code>" and "<code>\</code>" in a 'file' URL; it also seems to believe that <code>file://</code> is merely the scheme prefix, without understanding the specific meaning of the double slash to indicate the start of the authority segment; it is followed immediately by the drive letter
 +
* [http://www.infobiogen.fr/doc/info/lynx_help_files/lynx_help/lynx_url_support.html This Lynx documentation] shows how an implementation might treat '<code>~</code>' specially in a 'file' URL
 +
* [http://blogs.msdn.com/b/freeassociations/archive/2005/05/19/420059.aspx This MSDN blog from 2005] and [http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx this one from 2006] describe IE/Microsoft's approach to handling URIs like <code>file://c:\autoexec.bat</code>
 +
 
 +
Among various questions to survey, in addition to drive letters, remote mounts, add "file" access to local files with a) no hostname, b) "localhost", c) the actual host name. Does "file" accesses remote hosts either via their name or IP address when not remotely mounted? My experience with this last question is that it fails with the browsers that I have tried.
  
I'm not sure whether we should look at any version other than the latest of each. Though perhaps some older versions with a large installed base should be included. As I went through the above list, I would assume that if the latest version doesn't support much, then the earlier versions would do the same or less. I didn't look at the possible versions of each. I have access or could install most of these browsers. The exceptions are Mac OS X and Gnome.
+
In addition, check for variation with different character encodings (especially for Asian languages).
  
Among your questions, you listed drive letters, remote mounts, etc. I would add "file" access to local files with a) no hostname, b) "localhost", c) the actual host name. I would also ask whether "file" accesses remote hosts either via their name or IP address when not remotely mounted. My experience with this last question is that it fails with the browsers that I have tried.
+
[[Category:URI]]

Latest revision as of 05:28, 13 December 2013

This is the plan of action for updating the 'file' URI scheme. It is part of the W3C URI Interest Group's 'file' URI scheme update project.

Approach

There is disagreement over how prescriptive the specification should be, but the general approach taken by the IETF in the past has always leaned toward document what works moreso than fix what's broken. The chapter "IETF and the RFC Standards Process", from The Art of Unix Programming by Eric Steven Raymond, emphasizes that Internet RFCs and standards tend to be based more on actual implementation than pie-in-the-sky theory.

Therefore, we are starting with a survey of implementations, and will then provide guidelines that emphasize interoperability.

Survey implementations of file: URIs

What do they implement? How do they map file: URIs to various operating system special situations, including handling of character set transformations, inclusion of drive letters, remote mount directories, individual mount points, symbolic links or redirections?

What is useful common practice for getting interoperable results when creating file: URIs?

Recommend useful practice based on implementations

Based on the survey of implementations, recommend action:

  • What should URI creators write for file: URIs to be interoperable with most current implementations
  • What should (new or updated) file: URI interpreters do to handle the diversity of file URIs likely to be seen
  • Update the Proposed Standard for file: URIs to be consistent with common current practice, such that progression to Draft Standard (multiple, independent, interoperable implementations) is likely.

List of implementations to Survey

Browsers

Here is a list of browsers that we should cover (add to it if you feel something is missing):

  • Firefox: Windows 8/7 (maybe Windows XP), Mac OS X, Linux
    • Version 26.0 on Windows XP:
      • empty authority: local file system
      • "localhost" authority: rewritten so authority is empty
      • authority is a drive letter: rewritten so authority is empty and drive letter is part of path
      • drive letter with a pipe: interpreted as drive letter
      • UNC:
        • file://///authority/path\\authority\path, path must be non-empty
      • other: URL is ignored completely
  • Mozilla Suite: same as above (future versions will be released as SeaMonkey, by an independent group from the Mozilla Foundation)
    • Version 1.8b on Windows XP:
      • empty authority: local file system
      • "localhost" authority: local file system
      • authority is a drive letter: rewritten so authority is empty and drive letter is part of path
      • other: treated like "localhost"
  • Opera: same as above
    • (see Opera URI note)
    • Version 12.16 on Windows XP:
      • empty authority: rewritten so authority is "localhost"
      • "localhost" authority: local file system
      • authority is a drive letter: rewritten so authority is "localhost" and drive letter is part of path
      • drive letter with a pipe: rewritten with a colon
      • UNC:
        • file://authority/path\\authority\path, path must be non-empty
      • other: rewritten so authority is "localhost" and first path segment is "C:"
  • Lynx: character mode browser, same as above
    • Version 2.8.5rel.2 on Cygwin on Windows XP:
      • drive letters not understood on Cygwin, but /cygdrive/c is
      • note anomaly: if no trailing slash after authority, path is treated as "." rather than "/"
      • empty authority: local file system
      • "localhost" authority: local file system
      • other: file URI is treated as ftp URI
  • Links: character mode browser, same as above
    • Version 0.99pre14 on Cygwin on Windows XP:
      • drive letters not understood on Cygwin, but /cygdrive/c is
      • empty authority: local file system
      • other: error
  • W3m: character mode browser, same as above
    • Version 0.5.1 on Cygwin on Windows XP:
      • drive letters not understood on Cygwin, but /cygdrive/c is
      • empty authority: local file system
      • "localhost" authority: local file system
      • other: error
  • Internet Explorer: same Windows OSs as above; Internet Explorer on Macintosh. (No Linux)
    • Version 8.0 on Windows XP:
      • empty authority: local file system (opens in Windows Explorer)
      • "localhost" authority: local file system (opens in Windows Explorer)
      • authority is a drive letter: local file system (opens in Windows Explorer)
      • drive letter with a pipe: interpreted as drive letter
      • UNC:
        • file://authority/path\\authority\path, path may be empty
        • file:////authority/path\\authority\path, path may be empty
        • file://///authority/path\\authority\path, \path may be empty
      • other: error

The list above covers the major browsers and a few minor ones. We should focus on the latest of each; perhaps some older versions with a large installed base should be included.

Non-Browser Implementations

File Systems

Here is a list of file systems we should acknowledge. Each has different limitations in what characters it can support and how it stores them; this may affect how file: URIs are constructed and interpreted. Perhaps a matrix of how each browser interacts with each file system native to its platform would be useful:

  • FAT32 (popular on older Windows systems)
  • NTFS (popular on newer Windows systems)
  • ext2, ext3, ReiserFS, Reiser4 (popular on Linux systems)
  • UFS (popular on BSD and Mac OS X systems)
  • ISO 9660, Joliet, Rock Ridge, ISO 13490 (popular on CD-ROMs)
  • HFS+ (popular on older Mac OS systems)

Further Reading

Further reading on file systems and encodings:

  • Comparison of file systems on Wikipedia covers a lot of ground, and links to separate articles about each file system. Check the discussion page as well.
  • File system info by Chris Giese in addition to providing various FAT technical details, gives additional details about encodings, legal characters, and limitations of FAT12, FAT16, VFAT, FAT32, NTFS, ext2, ISO9660, Joliet, and HFS+
  • This page from IBM's WebSphere CORBA documentation is an example of an implementation expecting to see ":" and "\" in a 'file' URL; it also seems to believe that file:// is merely the scheme prefix, without understanding the specific meaning of the double slash to indicate the start of the authority segment; it is followed immediately by the drive letter
  • This Lynx documentation shows how an implementation might treat '~' specially in a 'file' URL
  • This MSDN blog from 2005 and this one from 2006 describe IE/Microsoft's approach to handling URIs like file://c:\autoexec.bat

Among various questions to survey, in addition to drive letters, remote mounts, add "file" access to local files with a) no hostname, b) "localhost", c) the actual host name. Does "file" accesses remote hosts either via their name or IP address when not remotely mounted? My experience with this last question is that it fails with the browsers that I have tried.

In addition, check for variation with different character encodings (especially for Asian languages).