Re: About the media types text/x-php and text/x-php-source
On 2012-08-28 04:32:18 +0200, Christoph Anton Mitterer wrote:
> On Mon, 2012-08-27 at 11:03 +0200, Vincent Lefevre wrote:
> > On 2012-08-26 19:55:49 +0200, Christoph Anton Mitterer wrote:
> > > Now obviously there's a small border; I guess IETF's idea is:
> > > "Can it be exectued/interpreted directly or by some interpreter? Then
> > > application/*"
> > Or compiled & executed, I suppose.
> Well of course,.. but everything compiled is binary,... so for those
> cases it's never questionable that it cannot be "text/"
No, I didn't mean binary, but e.g. C source. In general, C code
is not interpreted, but compiled before being executed.
So, I mean that standalone C source should be application/* based on
the above idea, while a C header file would typically be text/*.
I think this is quite awkward.
> > But what if the intent is to display the source (with specific style),
> > not to run it?
> Uhm... yeah that's the confusing point of the whole:
> MIME-Types never question what's the intent of the content!
I disagree. If a web server serves a CSS file as text/css, you'll get
a different behavior from the one where the same file is served as
text/plain. So, the MIME type is important for a part of the intent.
> You don't have specific mime types for e.g. a PDF for the cases it
> should be displayed or printed.
I'd say that "displayed" and "printed" are similar operations. In both
cases, the content is interpreted (executed) in the same way.
> The same applies for (script) source code, on whether it shall be
> executed or opened in some editor, debugger or e.g. doxygen.
> It's a matter of the user agent, to show a list of possible ways to
> handle a MIME time and a matter of the user to select what he wants.
> Not a matter of the server (who sets the mime type).
But the user agent may have different behaviors depending on the
MIME type, in particular if text/x-<some_language> is regarded as
a variant of text/plain (contrary to application/*).
Vincent Lefèvre <firstname.lastname@example.org> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)