# HG changeset patch # User Jaroslav Tulach # Date 1432536556 -7200 # Node ID 2dad34a3d7b0a14710043b9c38ef9bbe8c758d7b # Parent b1e712f66fe0afb8f79535cb0f11bc0a78e0c3c8 Hardcoding .sl mimetype for now. Should have an API so language implementations can declare their own supported mime types. diff -r b1e712f66fe0 -r 2dad34a3d7b0 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/vm/TruffleVM.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/vm/TruffleVM.java Mon May 25 01:37:31 2015 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/vm/TruffleVM.java Mon May 25 08:49:16 2015 +0200 @@ -147,7 +147,13 @@ if (location.getScheme().equals("file")) { File file = new File(location); s = Source.fromFileName(file.getPath(), true); - mimeType = file.getName().endsWith(".c") ? "text/x-c" : Files.probeContentType(file.toPath()); + if (file.getName().endsWith(".c")) { + mimeType = "text/x-c"; + } else if (file.getName().endsWith(".sl")) { + mimeType = "application/x-sl"; + } else { + mimeType = Files.probeContentType(file.toPath()); + } } else { URL url = location.toURL(); s = Source.fromURL(url, location.toString());