This commit is contained in:
tursom 2020-05-29 15:02:32 +08:00
parent 8b96411067
commit 512c523cad

View File

@ -29,7 +29,7 @@ object HttpRequest {
Charsets.UTF_8
} else {
var endIndex = contentType.indexOf("charset=", startIndex = startIndex, ignoreCase = true) + 8
if (endIndex < 0) endIndex = contentType.length
if (endIndex < 8) endIndex = contentType.length
if (startIndex == endIndex) {
Charsets.UTF_8
} else {