Made sure to strip off charset from content-type when importing from URLs before looking up for the right importer.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1229 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-08-25 17:35:16 +00:00
parent 996eb4d310
commit bd7453adba

View File

@ -372,7 +372,13 @@ public class CreateProjectCommand extends Command {
} }
try { try {
importer = ImporterRegistry.guessImporter(connection.getContentType(), url.getPath()); String contentType = connection.getContentType();
int semicolon = contentType.indexOf(';');
if (semicolon >= 0) {
contentType = contentType.substring(0, semicolon);
}
importer = ImporterRegistry.guessImporter(contentType, url.getPath());
internalInvokeImporter(project, importer, options, inputStream, connection.getContentEncoding()); internalInvokeImporter(project, importer, options, inputStream, connection.getContentEncoding());
} finally { } finally {