Open

Discussion in 'Firefox' started by AirPierre, Jul 28, 2004.

  1. AirPierre

    AirPierre Guest

    I have an HTML file with no extension (it's just named "newsroom")
    I'm trying to use Firefox ver (0.9.2) to open it and
    it says my file is a: application/octet-stream

    I've tried adding lines like:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    and
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=ISO-8859-1">
    but those didn't work.

    How can I get Firefox to realize it is really an html file?

    thx,
    AirPierre
     
    AirPierre, Jul 28, 2004
    #1
    1. Advertising

  2. AirPierre

    Moz Champion Guest

    AirPierre wrote:

    > I have an HTML file with no extension (it's just named "newsroom")
    > I'm trying to use Firefox ver (0.9.2) to open it and
    > it says my file is a: application/octet-stream
    >
    > I've tried adding lines like:
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    > and
    > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=ISO-8859-1">
    > but those didn't work.
    >
    > How can I get Firefox to realize it is really an html file?
    >
    > thx,
    > AirPierre


    add the extension.

    --
    Mozilla Champion
    UFAQ - http://www.UFAQ.org
    Mozilla Champions - http://mozillachampions.mozdev.org
    Mozilla Manual - http://mozmanual.mozdev.org/
     
    Moz Champion, Jul 29, 2004
    #2
    1. Advertising

  3. AirPierre

    AirPierre Guest

    Re: HTML file with no extension in Firefox

    Moz Champion <> wrote:
    >
    > add the extension.
    >


    It can't have an extension.
    I'm mimicking another system.

    - AirPierre
     
    AirPierre, Jul 29, 2004
    #3
  4. On Wed, 28 Jul 2004, AirPierre wrote:
    >
    > I have an HTML file with no extension (it's just named "newsroom")
    > I'm trying to use Firefox ver (0.9.2) to open it and
    > it says my file is a: application/octet-stream
    >
    > I've tried adding lines like:
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    > and
    > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=ISO-8859-1">
    > but those didn't work.
    >
    > How can I get Firefox to realize it is really an html file?


    It seems like Firefox /should/ be trying to guess the type from
    the contents in this case --- and by "should," I mean I thought that
    was what it was documented as doing.

    This is an issue one of whose solutions is the same as the first
    misfeature I reported about a week ago here, before noticing it was
    already reported on Bugzilla. Check out

    http://bugzilla.mozilla.org/show_bug.cgi?id=57342#c62

    and tell me if that's something that would solve the problem you're
    having.


    [I repeat my desperate plea for someone with Cygwin and MSVC to
    compile the patched version and post diffs somewhere!]

    -Arthur
     
    Arthur J. O'Dwyer, Jul 29, 2004
    #4
  5. AirPierre

    Moz Champion Guest

    Arthur J. O'Dwyer wrote:
    >
    > On Wed, 28 Jul 2004, AirPierre wrote:
    >
    >>
    >> I have an HTML file with no extension (it's just named "newsroom")
    >> I'm trying to use Firefox ver (0.9.2) to open it and
    >> it says my file is a: application/octet-stream
    >>
    >> I've tried adding lines like:
    >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    >> and
    >> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    >> CHARSET=ISO-8859-1">
    >> but those didn't work.
    >>
    >> How can I get Firefox to realize it is really an html file?

    >
    >
    > It seems like Firefox /should/ be trying to guess the type from
    > the contents in this case --- and by "should," I mean I thought that
    > was what it was documented as doing.
    >
    > This is an issue one of whose solutions is the same as the first
    > misfeature I reported about a week ago here, before noticing it was
    > already reported on Bugzilla. Check out
    >
    > http://bugzilla.mozilla.org/show_bug.cgi?id=57342#c62
    >
    > and tell me if that's something that would solve the problem you're
    > having.
    >
    >
    > [I repeat my desperate plea for someone with Cygwin and MSVC to
    > compile the patched version and post diffs somewhere!]
    >
    > -Arthur


    According to web standards, file types should not be 'guessed' at but
    are specified by the mime type provided by the server, if no mime type
    exists, then they will be treated as application/octet-stream.

    RFC2046.
    Specifically, section 4.1. of that says:

    Beyond plain text, there are many formats for representing what might
    be known as "rich text". An interesting characteristic of many such
    representations is that they are to some extent readable even without
    the software that interprets them. It is useful, then, to
    distinguish them, at the highest level, from such unreadable data as
    images, audio, or text represented in an unreadable form. In the
    absence of appropriate interpretation software, it is reasonable to
    show subtypes of "text" to the user, while it is not reasonable to do
    so with most nontextual data. Such formatted textual data should be
    represented using subtypes of "text".

    Later, in 4.1.4:

    Unrecognized subtypes of "text" should be treated as subtype "plain"
    as long as the MIME implementation knows how to handle the charset.
    Unrecognized subtypes which also specify an unrecognized charset
    should be treated as "application/octet-stream".

    Extensions are opaque to many systems and cannot be relied on to
    determine the file type.



    --
    Mozilla Champion
    UFAQ - http://www.UFAQ.org
    Mozilla Champions - http://mozillachampions.mozdev.org
    Mozilla Manual - http://mozmanual.mozdev.org/
     
    Moz Champion, Jul 30, 2004
    #5
  6. On Fri, 30 Jul 2004, Moz Champion wrote:
    >
    > According to web standards, file types should not be 'guessed' at but are
    > specified by the mime type provided by the server, if no mime type exists,
    > then they will be treated as application/octet-stream.


    I now recognize that you don't like the idea of flaws in your web
    browser of choice, but you at least ought to /read/ what you copy.

    > RFC2046.
    > Specifically, section 4.1. of that says:
    >
    > Beyond plain text, there are many formats for representing what might
    > be known as "rich text".


    [completely irrelevant to anything being discussed here]

    > Later, in 4.1.4:
    >
    > Unrecognized subtypes of "text" should be treated as subtype "plain"
    > as long as the MIME implementation knows how to handle the charset.
    > Unrecognized subtypes which also specify an unrecognized charset
    > should be treated as "application/octet-stream".


    Irrelevant, as the OP's file does not have either a MIME type /or/
    a charset encoding, recognized or un-. The file in question is being
    read out of a disk file. Thus it is Mozilla's job to supply an
    appropriate MIME type (and encoding, though UTF-8 is generally the
    way to go in English-speaking countries).

    Note particularly two things:

    (1) The OP's file's correct MIME type is "text/html", which is
    /not/ an "unrecognized subtype of 'text'" by anyone's
    definition; thus it makes no sense even to treat it as
    "text/plain", as you suggest.

    (2) Even for files served from a proper web server, Firefox does
    not follow the RFC you just quoted w.r.t. unrecognized subtypes
    of "text". (This is the bug to which I linked above.) So
    I don't think it makes sense for you to try to use the RFC
    to /defend/ its broken behavior!

    -Arthur
     
    Arthur J. O'Dwyer, Jul 30, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Silverstrand

    NVIDIA to launch 'open driver'?

    Silverstrand, Jun 23, 2005, in forum: Front Page News
    Replies:
    5
    Views:
    816
    unholy
    Jun 26, 2005
  2. skank bastage
    Replies:
    1
    Views:
    456
    ┬░Mike┬░
    Nov 15, 2003
  3. NoLikey Spam
    Replies:
    5
    Views:
    61,800
    The Bear
    Dec 17, 2003
  4. Mike
    Replies:
    6
    Views:
    15,328
  5. Have A Nice Cup of Tea

    Open Doors to Open Source

    Have A Nice Cup of Tea, Apr 9, 2006, in forum: NZ Computing
    Replies:
    12
    Views:
    535
    Jerry
    Apr 11, 2006
Loading...

Share This Page