From e530ccaeb8ad8049e39d3dc76df035b3b4095559 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 17 Aug 2012 11:31:40 +0900 Subject: [PATCH] Fix typo --- .../netty/handler/codec/http/HttpMessageEncoder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpMessageEncoder.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpMessageEncoder.java index ca84a0ee16..e61cbff223 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpMessageEncoder.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpMessageEncoder.java @@ -64,11 +64,11 @@ public abstract class HttpMessageEncoder extends MessageToByteEncoder { public void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Exception { if (msg instanceof HttpMessage) { HttpMessage m = (HttpMessage) msg; - boolean contentMustBeEmmpty; + boolean contentMustBeEmpty; if (m.isChunked()) { // if Content-Length is set then the message can't be HTTP chunked if (HttpCodecUtil.isContentLengthSet(m)) { - contentMustBeEmmpty = false; + contentMustBeEmpty = false; transferEncodingChunked = false; } else { // check if the Transfer-Encoding is set to chunked already. @@ -76,11 +76,11 @@ public abstract class HttpMessageEncoder extends MessageToByteEncoder { if (!HttpCodecUtil.isTransferEncodingChunked(m)) { m.addHeader(Names.TRANSFER_ENCODING, Values.CHUNKED); } - contentMustBeEmmpty = true; + contentMustBeEmpty = true; transferEncodingChunked = true; } } else { - transferEncodingChunked = contentMustBeEmmpty = HttpCodecUtil.isTransferEncodingChunked(m); + transferEncodingChunked = contentMustBeEmpty = HttpCodecUtil.isTransferEncodingChunked(m); } out.markWriterIndex(); @@ -91,7 +91,7 @@ public abstract class HttpMessageEncoder extends MessageToByteEncoder { ByteBuf content = m.getContent(); if (content.readable()) { - if (contentMustBeEmmpty) { + if (contentMustBeEmpty) { out.resetWriterIndex(); throw new IllegalArgumentException( "HttpMessage.content must be empty if Transfer-Encoding is chunked.");