Skip to content

Commit cce8c8b

Browse files
committed
Fix test failure. Logic was using the platform charset for a request body if none was specified. Test ran fine within intellij as the default charset was macroman, however, when run from the commandline, the test would fail as the default would be UTF-8. ISO-8859-1 is now used if no encoding is specified.
1 parent c00b2b0 commit cce8c8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ public boolean doHandle(final FilterChainContext ctx,
20012001

20022002
String charset = request.getBodyEncoding();
20032003
if (charset == null) {
2004-
charset = Charsets.DEFAULT_CHARACTER_ENCODING;
2004+
charset = Charsets.ASCII_CHARSET.name();
20052005
}
20062006
final byte[] data = request.getStringData().getBytes(charset);
20072007
final MemoryManager mm = ctx.getMemoryManager();

0 commit comments

Comments
 (0)