Re: errors don't come back as Content-type: text/html


Excuse me for moving the discussion to this list, but as you are both
subscribed and here I can give some more specific information.

> >        Not sure if this was best.   One annoying feature of Mosaic
> >is that it presumes things are HTML unless otherwise explicitly labeled.
> >Retrieve any number of plain-text items that aren't clearly labeled,
> >and blech!   Runtogethernonsense.   Maybe there should be some fall-back
> >processing when there's no content-type record.   It shouldn't be a really
> >compilcated matter for Lynx, Mosaic, and friends to eyeball the first
> >line and look for the canonical "<html>" or other SGML-ish strings.
> >("<plaintext>" being a special case,  of course)   Maybe this feature
> >should be in the WWW Library code?

The version 2.16 of the library _does_ contain a `guess stream' module.
Look into the HTGuess.c module (or the description in HTGuess.html) and
you will find it.

This is currently used in the two functions that parses a input stream
from the network or a local file:


> I agree.  I actually do not like Mosaic's behavior of assuming text/html
> unless told otherwise.  This gives lovely behavior when trying to access
> something like a file compressed with gzip.  XMosaic stuffs a bunch of
> gibberish onto the screen.
> I think this has been discussed before.  Didn't it go like this? :
>         1.  Obey the HTTP 1.0 content type
>         2.  Otherwise, check the suffix on the file and guess
>         3.  Otherwise, call HTSaveLocally (or equiv) to just put the
>                 file on local disk.

As I said on www-talk - I think it is a bad idea to treat unknown
content-types as text/html. The three steps above are the current

-- cheers --

Henrik Frystyk