See http://openide.netbeans.org/ main page, click on apiexamples.jar to
download. It comes as text because there is no MIME type defined. On Windows,
the resulting file is corrupt due to newline translation and cannot be opened.
Same goes for *.nbm files.
added "AddType application/x-jar .jar" to '...tigris/conf/httpd.conf'
To solve *.nbm problem, also added to httpd.conf
AddType application/x-nbm .nbm
(Is application/x-nbm a registered MIME type??)
It doesn't matter what the MIME types actually are, so long as they are not
text/* which triggers the newline conversion.
BTW anyone testing from NetBeans office--beware that the Sun proxy server has
all examples cached and still serves them as text/plain. Netscape's "reload" has
no effect on this. Verified that the netbeans.org server is giving the right
MIME type using:
http_proxy=$host:$port wget --header='Cache-Control: no-cache' -S $url
BTW I would suggest that the default MIME type *not* be text/plain which will
only cause this problem to recur in the future, that it rather be
Regarding firstname.lastname@example.org's suggestion that default Apache
MIME type be application/octet-stream... This is one of those six of one,
half-dozen of the other sorts of bug-fixes. If that was done, then
files like README or CHANGELOG or other common-names used in development
would not be readable by a web-browser.
Therefore, I still advocate leaving the Apache default MIME type of text/html.
However, it is clear that Tigris would benefit from an administrative screen to
allow client-administrators to setup specific MIME-types for special customer
defined filename extensions/types, such as *.nbm files.
Understood that null extension or *.ME should be text by default. (In fact in
our sources we always use *.txt for these when that is what we mean.) But +1 on
idea to have a web-administrable MIME type listing, this would short-circuit the
discussion. Or is there some standard way of giving custom MIME types for the
files in a given directory? Like some dot-file you can place in a dir to
override MIME type defaults?
Yes - AFAIK you can do AddType in a .htaccess file -
I still face the problem getting one .jar file as text/plain. But this time
it is strange - there are two files referenced from
http://scripting.netbeans.org - script-patch.jar comes fine and scripting.jar
comes as text/plain. Both files are in cvs as binary files with suffix .jar.
*.nbm is broken again, it gives text/plain. BTW I suspect that David's problem
with *.jar is that the correct (binary) JAR was in our proxy cache as a binary
type, and the broken text/plain one was not. Probably the server upgrade ditched
the custom MIME type mappings. I have just uploaded a *.nbm and checked with
wget with cache-control no-cache and it is giving me text/plain.
BTW I tried to add a .htaccess file in
www.netbeans.org/download/nbms/40/.htaccess as follows:
AddType application/octet-stream NBM
but it does not appear to have worked. Also tried lowercase "nbm", to no avail.
I think this is fixed now, but I am not sure.
http://www.netbeans.org/download/nbms/40/makefile.nbm -> application/x-nbm
http://www.netbeans.org/download/nbms/40/apisupport.nbm -> text/plain
This with no-cache on. So I am not sure if (a) the webserver is really weird and
gives different MIME types at random or (b) our proxy cache is severely buggy. I
would really appreciate someone not behind the Sun firewall testing this to see
where the problem lies.
Jesse, I downloaded both of those files and they both were recognized as
We recently moved out from Collabnet's infrastructure