Home
last modified time | relevance | path

Searched refs:responseCharset (Results 1 – 2 of 2) sorted by relevance

/libcore/luni/src/test/java/libcore/net/http/
DResponseUtilsTest.java22 import static libcore.net.http.ResponseUtils.responseCharset;
26 assertEquals(StandardCharsets.UTF_8, responseCharset(null)); in test_responseCharset_missing()
27 assertEquals(StandardCharsets.UTF_8, responseCharset("text/plain")); in test_responseCharset_missing()
28 assertEquals(StandardCharsets.UTF_8, responseCharset("text/plain;foo=bar;baz=bal")); in test_responseCharset_missing()
29 assertEquals(StandardCharsets.UTF_8, responseCharset("text/plain;charset=")); in test_responseCharset_missing()
34 responseCharset("text/plain;charset=ISO-8859-1")); in test_responseCharset_valid()
36 responseCharset("text/plain;CHARSET=ISO-8859-1")); in test_responseCharset_valid()
38 responseCharset("text/plain; charset = ISO-8859-1")); in test_responseCharset_valid()
40 responseCharset("text/plain; foo=bar;baz=bag;charset=ISO-8859-1")); in test_responseCharset_valid()
42 responseCharset("text/plain;charset=ISO-8859-1;;==,==")); in test_responseCharset_valid()
[all …]
/libcore/luni/src/main/java/libcore/net/http/
DResponseUtils.java40 public static Charset responseCharset(String contentTypeHeader) in responseCharset() method in ResponseUtils
42 Charset responseCharset = StandardCharsets.UTF_8; in responseCharset() local
47 responseCharset = Charset.forName(charsetParameter); in responseCharset()
51 return responseCharset; in responseCharset()