This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: getting the JDK built-in web server to set the correct mime type
- From: Per Bothner <per at bothner dot com>
- To: Alex Mitchell <lexaay at gmail dot com>
- Cc: "kawa at sourceware dot org" <kawa at sourceware dot org>
- Date: Fri, 16 Aug 2013 00:21:33 -0700
- Subject: Re: getting the JDK built-in web server to set the correct mime type
- References: <CDBB1D91 dot 48D59%lexaay at gmail dot com> <51F9FBA5 dot 6050101 at bothner dot com> <CAJuayrTVMDWZONtb4o6FZp4+mtVG447Td4uJ4CBUT7pzxO-SaA at mail dot gmail dot com>
On 08/15/2013 12:55 AM, Alex Mitchell wrote:
I see that you've committed this change to SVN. Unfortunately I think
there's a minor error, as I'm still getting invalid mime type when
browsing files using IE.
I believe lines 426-428 in Path.java should be
if (contentType == null) {
contentType = URLConnection.guessContentTypeFromName(getPath());
}
rather than
if (contentType != null) {
contentType = URLConnection.guessContentTypeFromName(getPath());
}
After making this change, the mime type seems to be detected correctly.
Oops - indeed. I checked in this fix. Thanks,
--
--Per Bothner
per@bothner.com http://per.bothner.com/