[jboss-cvs] JBossAS SVN: r102163 - projects/vfs/trunk/src/main/java/org/jboss/vfs/protocol.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 9 15:19:58 EST 2010
Author: johnbailey
Date: 2010-03-09 15:19:57 -0500 (Tue, 09 Mar 2010)
New Revision: 102163
Modified:
projects/vfs/trunk/src/main/java/org/jboss/vfs/protocol/AbstractURLConnection.java
Log:
[JBVFS-149] - Removed calle to super.getHeaderField for content type
Modified: projects/vfs/trunk/src/main/java/org/jboss/vfs/protocol/AbstractURLConnection.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/vfs/protocol/AbstractURLConnection.java 2010-03-09 20:15:13 UTC (rev 102162)
+++ projects/vfs/trunk/src/main/java/org/jboss/vfs/protocol/AbstractURLConnection.java 2010-03-09 20:19:57 UTC (rev 102163)
@@ -73,17 +73,14 @@
public String getContentType() {
if(contentType != null)
return contentType;
- contentType = super.getHeaderField("content-type");
+ contentType = getFileNameMap().getContentTypeFor(getName());
if(contentType == null) {
- contentType = getFileNameMap().getContentTypeFor(getName());
- if(contentType == null) {
- try {
- InputStream is = getInputStream();
- BufferedInputStream bis = new BufferedInputStream(is);
- contentType = java.net.URLConnection.guessContentTypeFromStream(bis);
- bis.close();
- } catch(IOException e) { /* ignore */ }
- }
+ try {
+ InputStream is = getInputStream();
+ BufferedInputStream bis = new BufferedInputStream(is);
+ contentType = java.net.URLConnection.guessContentTypeFromStream(bis);
+ bis.close();
+ } catch(IOException e) { /* ignore */ }
}
return contentType;
}
More information about the jboss-cvs-commits
mailing list