mirror of https://github.com/sbt/sbt.git
Merge pull request #214 from staale/patch-1
Fix to issue #180 to handle null contentType
This commit is contained in:
commit
1a566d8750
|
|
@ -51,7 +51,7 @@ class GigahorseUrlHandler extends AbstractURLHandler {
|
||||||
|
|
||||||
if (checkStatusCode(url, response)) {
|
if (checkStatusCode(url, response)) {
|
||||||
val bodyCharset =
|
val bodyCharset =
|
||||||
BasicURLHandler.getCharSetFromContentType(response.body().contentType().toString)
|
BasicURLHandler.getCharSetFromContentType(Option(response.body().contentType()).map(_.toString).orNull)
|
||||||
Some(
|
Some(
|
||||||
new SbtUrlInfo(true,
|
new SbtUrlInfo(true,
|
||||||
response.body().contentLength(),
|
response.body().contentLength(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue