Skip to content

Commit 9112398

Browse files
committed
Merge pull request AsyncHttpClient#42 from pkulak/patch-1
Deal with bogus character sets in the content type, ie: "charset=".
2 parents 1217e17 + 5e3844a commit 9112398

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ public static String parseCharset(String contentType) {
432432
for (String part : contentType.split(";")) {
433433
if (part.trim().startsWith("charset=")) {
434434
String[] val = part.split("=");
435-
if (val[1] != null) {
435+
if (val[1].length > 1) {
436436
return val[1].trim();
437437
}
438438
}

0 commit comments

Comments
 (0)