diff src/org/eclipse/jetty/server/handler/ResourceHandler.java @ 1023:27f3dc761452

MimeTypes uses StringCache
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 01 Nov 2016 03:44:46 -0600
parents 3718afd99988
children 921c25a05eaa
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/handler/ResourceHandler.java	Tue Nov 01 01:04:46 2016 -0600
+++ b/src/org/eclipse/jetty/server/handler/ResourceHandler.java	Tue Nov 01 03:44:46 2016 -0600
@@ -385,12 +385,12 @@
 			}
 		}
 
-		Buffer mime=_mimeTypes.getMimeByExtension(resource.toString());
+		String mime = _mimeTypes.getMimeByExtension(resource.toString());
 		if (mime==null)
 			mime=_mimeTypes.getMimeByExtension(request.getPathInfo());
 
 		// set the headers
-		doResponseHeaders(response,resource,mime!=null?mime.toString():null);
+		doResponseHeaders(response,resource,mime);
 		response.setDateHeader(HttpHeaders.LAST_MODIFIED,last_modified);
 		
 		if(skipContentBody)