|
I looked into the sources and yes a JarURLConnection looks first in the
inputstream itself It calls the public String guessContentTypeFromStream(InputStream is) of URLConnection And only if that fails it goes to: public static String guessContentTypeFromName(String fname) { return getFileNameMap().getContentTypeFor(fname); } FileURLConnection doesn't do guess by stream but direct does that through the filename map: FileNameMap map = java.net.URLConnection.getFileNameMap(); contentType = map.getContentTypeFor(filename); in the initializeHeaders method. So if you really want the right content type you should first try the call the static guesContentTypeFromStream of the URLConnection class. Should i change this so that file also first checks by stream? johan Juergen Donnerstag wrote: On 4/18/05, Johan Compagner <[EMAIL PROTECTED]> wrote: |
- Re: [Wicket-develop] Fwd: [ wicket-Bugs-1184215 ] examp... Johan Compagner
- Re: [Wicket-develop] Fwd: [ wicket-Bugs-1184215 ] ... Juergen Donnerstag
