Skip to content

Commit

Permalink
added in charset
Browse files Browse the repository at this point in the history
  • Loading branch information
synapticloop committed Apr 8, 2017
1 parent bd63827 commit cee2482
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
*/

import java.io.IOException;
import java.nio.charset.Charset;

import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
@@ -199,7 +200,7 @@ private <T> T execute(String httpMethod, String url, String path, int allowableS
} else {
LOGGER.error("Invalid status code received: {}, wanted: {}.", statusCode, allowableStatusCode);
try {
throw new GetCookieApiException(IOUtils.toString(response.getEntity().getContent()));
throw new GetCookieApiException(IOUtils.toString(response.getEntity().getContent(), Charset.forName("UTF-8")));
} catch (UnsupportedOperationException | IOException ex) {
throw new GetCookieApiException(ex);
}

0 comments on commit cee2482

Please sign in to comment.