Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: Identifying (X)HTML without MIME

From: Dmitry Beransky <dberansky@ucsd.edu>
Date: Mon, 08 Nov 2004 21:16:24 +0000
Message-Id: <6.0.3.0.0.20041108131217.046783e0@biomail.ucsd.edu>
To: www-html@w3.org




Ideally, you should rely on the underlying OS to tell you what the mime 
type of a file is.  A Windows OS will use a file's extension and the 
Registry to figure out the type; a linux/unix os may use the magic number 
database; MacOS X may use the resource bundle.  How to ask the system for 
this kind of info depends on the language you use.


Dmitry

At 02:48 PM 11/6/2004, James Cerra wrote:
>Now HTML was origionally designed for transport over
>the web via HTTP and identification via MIME types.
>However, there are cases where (X)HTML may be
>transmitted with no MIME type information available.
>e.g. Reading a file from a FAT disk or though standard
>io.  I'm writing a program where this type of
>situation may come up.  The specs are silent on the
>issue, so: What are the recommendations for
>identifying the document's type when MIME or HTTP is
>not available?
>
>-- Jimmy Cerra
Received on Monday, 8 November 2004 22:15:39 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.