소스 검색

response content-type = null

Евгений Колесников 4 년 전
부모
커밋
ec97ba21a8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      shpora/HttpHelper.kt

+ 1 - 1
shpora/HttpHelper.kt

@@ -82,7 +82,7 @@ object HTTP
 
         con.requestMethod = "HEAD"
         val contentType = con.contentType
-        return if(contentType.contains("Windows-1251", true))
+        return if(contentType!=null && contentType.contains("Windows-1251", true))
             "Windows-1251"
         else
             "UTF-8"