W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > July to September 2002

RE: Tx of text type docs and CR/LF, CR, LF translation

From: ME <dugan@passwall.com>
Date: Mon, 8 Jul 2002 10:12:50 -0700 (PDT)
To: Lisa Dusseault <ldusseault@xythos.com>
cc: w3c-dist-auth@w3.org
Message-ID: <Pine.LNX.4.21.0207080947050.25389-100000@nerds.passwall.com>

On Wed, 3 Jul 2002, Lisa Dusseault wrote:
> The problem you describe is not particularly a WebDAV problem. IMAP and
> FTP are subject to the same problems.  MIME also does not attempt to fix
> the problem.

FTP allows for use of ASCII (A) mode transfers as well as binary/image
(I), and as for MIME attached docs to e-mail messages, CR/LF and line
termination for text files is done by most modern mail clients to allow
the user of the local OS to view their text/* files in their local OS's
line termination format. (I know this means some mail clients do not
follow the RFC for mail, but they offer the user something they want and 
are able to use.)

> The HTTP 1.1 specification does make some attempt to improve the
> situation, and it works *when viewing in the browser*.  It's not clear
> how browsers should save files though. The browser could: 
>  - save the file the same way it was downloaded
>  - save the transformed file, replacing single CR or LF with CRLF
> 
> Either approach leads to problems.  The current common approach, where
> the browser saves the file the way it was downloaded, means the file may
> be unusable when viewed in various text editors.  However, if the
> browser transforms the file, it may be altering the file
> inappropriately.  The transformation assumes that wherever CR or LF is
> used CRLF is appropriate, and that may not be true for all uses of
> 'text/plain'.  
>
> I see why you wish attention to be brought to this subject, but the real
> offenders are not WebDAV clients.  It's applications like NotePad that
> can't display reasonable file formats that are problematic. Those
> implementers are unlikely to read this list or the WebDAV specification.

I can understand this side and point of view, and see it would be easier
to not enforce client side conversion for local OS line break format with
text files. Inclusion of an OS specific line break as a requirement ties
"OS" to the RFC, and can make it less employable in unforseen
environments. Users who happen to use WebDAV to move CGI files or perl
scripts and edit with a text editor that does not understand multi-OS line
break formats will wonder why the script stops working on the web server,
but they will need to be told it is not WebDAV, but the editor that came
with their OS. They can download and use BBEdit for MacOS 9.x and earlier
or the new one with MacOSX, etc.

> You might try reporting this behavior as a bug to the manufacturers of
> the offending software.

Alas, there are at least 30 different text based editors for various OS
that recognize the local OS line break formats exclusively, though many
are used by few, outdated, no longer available, and not open
source. However, there are about 4 major WebDAV clients out there in
production where a modification from server formatted line breaks to local
OS line breaks with little modification to code required. I chose to try
the least-work path and have it addressed here.

Based on the responses in this list, I can see enough support exists
against this line break feature being incorporated into the WebDAV RFC
that I don't feel any need to push it.

Insetad, I have found a way to make my web server provide on-the-fly line
break conversion of files pushed through WebDAV such that each client gets
their local OS's line breaks for specific text/* files and then upon
being returned to the server get converted to the Server's expected line
break format. This works for my users, and only applies to the WebDAV
work. If WebDAV clients should ever add this as a local feature, the
"fix" (hack) allows for addresing client specific information to determine
how the conversion should work - if at all.

Thanks for your time in reading the original request, WebDAV is still
much, much better than other file transfer protocols for the needs of my
web users.

-ME

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++ 
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
Received on Monday, 8 July 2002 13:16:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:44:01 GMT