Comment 174 for bug 25830

Revision history for this message
In , Joao-batista (joao-batista) wrote :

SUBJECT: Another user situation description.

AGENT: Mozilla 1.7.8
Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1

1) A "proper behavior" example.
This seems to be a problem not only of Mozilla but also of malformed server
configs. I've tryied opening directly C/C++ source code files by typing the URL
on the address bar, and the file is rendered (as expected) as text/plain. By
right-clicking the rendered text window and selecting Page Info, it reports it
is MIME type "text/plain" (not "text/x-csrc" or similar? weird...), with "Quirks
mode" rendering mode. For the time-being I have an example at
http://fisica.fc.ul.pt/~jbatista/tstamp.c

2) A "improper behavior" example.
On other examples I've seen (regretably, it's behind a firewall so it's no point
[and I've tried!] putting the URL here, sorry), even though I've explicitly
edited the HTML anchor to assign type="text/x-csrc" and even type="text/plain",
this is what happens. The browser complains it DOES NOT recognize the MIME type
text/x-csrc (i.e., it correclty identifies the MIME type...) and asks how the
file should be opened. The specific link points to a *.c file linked to by a
Tikiwiki page ( http://www.tikiwiki.org/ ), this page being generated by a PHP
script. Now, IMHO it is likely that the Tikiwiki somehow screws up the Content
Type string (if indeed one is sent).

So, IMHO it seems that if some server-side application (Tikiwiki most certainly,
some Apache configurations likely) attempts to interpret the file's contents and
send the Content Type string. However, Mozilla does not know what to do with
text/x-csrc MIMEs. On the other hand, it appears in example 1) that there was no
inclusion of a "Content Type" string in the data stream, and the stream is
identified by Mozilla as text (hence the text/plain). But I'm just theorizing
since I haven't looked into the Mozilla code...

I suppose there are ways to have a look at the data stream's content, right? How
is it done (pardon the newbie question)? If someone tells me I'm likely to try
it and post here the results, if there's interest on them. :-)