String content = match.getString();
CharBuffer buffer = CharBuffer.wrap(content.toCharArray());
Charset utf8Charset = Charset.forName("UTF-8");
String utf8Content = new String(utf8Charset.encode(buffer).array(), "UTF-8");
return new OkPage(url, utf8Content);
}
return new ErrorPage(url, status);
} finally {
method.abort();
}