Bug 7053 - webserver MIME type mapping needs entry for *.jar
webserver MIME type mapping needs entry for *.jar
Status: RESOLVED INVALID
Product: obsolete
Classification: Unclassified
Component: collabnet
3.x
PC Windows ME/2000
: P1 (vote)
: TBD
Assigned To: support
issues@www
:
Depends on:
Blocks: 6907
  Show dependency treegraph
 
Reported: 2000-07-13 18:03 UTC by Jesse Glick
Modified: 2009-11-08 02:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2000-07-13 18:03:22 UTC
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.
Comment 1 Jesse Glick 2000-08-11 10:59:59 UTC
Same goes for *.nbm files.
Comment 2 support 2000-08-22 08:16:59 UTC
added "AddType application/x-jar .jar" to '...tigris/conf/httpd.conf'
Comment 3 support 2000-08-22 08:25:59 UTC
To solve *.nbm problem, also added to httpd.conf
    AddType application/x-nbm .nbm

(Is application/x-nbm a registered MIME type??)
Comment 4 Jesse Glick 2000-08-22 10:08:59 UTC
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
Comment 5 Jesse Glick 2000-08-22 10:11:59 UTC
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
application/octet-stream.
Comment 6 support 2000-08-23 02:25:59 UTC
Regarding jesse.glick@netbeans.com'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.
Comment 7 Jesse Glick 2000-08-23 10:48:59 UTC
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?
Comment 8 jcatchpoole 2000-08-23 11:04:59 UTC
Yes - AFAIK you can do AddType in a .htaccess file -
http://www.apache.org/docs/mod/mod_mime.html#addtype
Comment 9 David Strupl 2000-10-16 16:16:59 UTC
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.
Comment 10 Jesse Glick 2000-10-18 18:13:59 UTC
*.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.
Comment 11 Jesse Glick 2000-10-18 18:22:59 UTC
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.
Comment 12 Jesse Glick 2000-10-20 17:12:59 UTC
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.
Comment 13 Unknown 2000-10-24 02:38:59 UTC
Jesse,  I downloaded both of those files and they both were recognized as

type Application/x-nbm
Comment 14 Unknown 2004-10-13 09:01:41 UTC
closing..
Comment 15 Marian Mirilovic 2009-11-08 02:26:41 UTC
We recently moved out from Collabnet's infrastructure


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo