Re: review of content type rules by IETF/HTTP community

Hi Boris,

On Aug 26, 2007, at 1:01 PM, Boris Zbarsky wrote:

>
> Robert Burns wrote:
>> However, after further testing, both Opera and Firefox treat the  
>> file as HTML. Here's the HTTP header's they get that they treat as  
>> HTML
>
> ...
>> Content-Type: unknown
>
> Since that can't actually be parsed as a content type (no '/', for  
> example), this is treated identically to a missing Content-Type  
> header by Firefox.
>
> Which is what you should do if you don't know the type.  No need to  
> invent an "unknown" type.

My mistake. I changed it to 'unknown/' and now Firefox instead tries  
to download the file (note: before it was treating it as HTML and not  
unknown so it did make a difference). Opera and Safari are also  
putting up the download dialog.

However, the point of registering a new IANA MIME type 'unknown' and  
issuing an accompanying RFC, is to raise awareness about the issue.   
 From the bug cited earlier[1], it looks to me that Apache is  
unwilling to fix their bug (from what I can tell you even submitted a  
patch fro them). So registering an 'unknown' MIME type would let  
server admin's (and probably more importantly Apache vendors) know to  
change DefaultType to 'unknown'. Note that this isn't for the case  
when the type is unknown to the client, but when the server feels the  
need to send a type for some reason when it simply can't do it  
accurately. Since IANA already has a type 'example' and 'example' sub- 
types for each primary type, it seems no different to also indicate  
explicitly 'unknown'.

Note that in Apache, if I comment out DefaultType completely, Apache  
goest back to sending 'text/html'  (with no string following  
DefaultType Apache is unable to start). Those trying to configure  
Apache according to specifications will not be able to do so without  
either: 1) Apache fixing this bug or 2) Adding a IANA MIME type to  
send explicitly 'unknown'. At least those are the options that I can  
think of; I'd be happy to hear other suggestions.

I'd also be interested to know how IIS and TUX handle this situation  
where the server does not know the MIME type.

Take care,
Rob

[1]: <http://issues.apache.org/bugzilla/show_bug.cgi?id=13986>

Received on Sunday, 26 August 2007 19:08:09 UTC