US-ASCII -> ASCII

This commit is contained in:
Trustin Lee 2009-02-12 07:03:35 +00:00
parent 912c66b931
commit e787378024
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ public class Base64Decoder extends OneToOneDecoder {
throws Exception {
if (msg instanceof String) {
msg = ChannelBuffers.wrappedBuffer(
((String) msg).getBytes("US-ASCII"));
((String) msg).getBytes("ASCII"));
} else if (!(msg instanceof ChannelBuffer)) {
return msg;
}

View File

@ -45,7 +45,7 @@ import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
@ChannelPipelineCoverage("one")
public abstract class HttpMessageEncoder extends OneToOneEncoder {
private static final ChannelBuffer LAST_CHUNK = copiedBuffer("0\r\n\r\n", "USASCII");
private static final ChannelBuffer LAST_CHUNK = copiedBuffer("0\r\n\r\n", "ASCII");
@Override
protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
@ -74,7 +74,7 @@ public abstract class HttpMessageEncoder extends OneToOneEncoder {
int contentLength = content.readableBytes();
return wrappedBuffer(
copiedBuffer(Integer.toHexString(contentLength), "USASCII"),
copiedBuffer(Integer.toHexString(contentLength), "ASCII"),
wrappedBuffer(CRLF),
content.slice(content.readerIndex(), contentLength),
wrappedBuffer(CRLF));