Merge pull request #214 from staale/patch-1

Fix to issue #180 to handle null contentType
This commit is contained in:
Dale Wijnand 2018-02-28 10:56:49 +00:00 committed by GitHub
commit 1a566d8750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class GigahorseUrlHandler extends AbstractURLHandler {
if (checkStatusCode(url, response)) {
val bodyCharset =
BasicURLHandler.getCharSetFromContentType(response.body().contentType().toString)
BasicURLHandler.getCharSetFromContentType(Option(response.body().contentType()).map(_.toString).orNull)
Some(
new SbtUrlInfo(true,
response.body().contentLength(),