Fix a regression in HttpMessageDecoder due to a mistake during yak shaving

This commit is contained in:
Trustin Lee 2012-11-10 01:55:33 +09:00
parent b8f5ef0423
commit 27dc582e2b
2 changed files with 3 additions and 4 deletions

View File

@ -537,7 +537,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<Object, HttpMe
String line = readHeader(buffer);
String name = null;
String value = null;
if (line.isEmpty()) {
if (!line.isEmpty()) {
message.clearHeaders();
do {
char firstChar = line.charAt(0);

View File

@ -20,12 +20,11 @@ import io.netty.buffer.Unpooled;
import io.netty.channel.embedded.EmbeddedByteChannel;
import io.netty.handler.codec.DecoderResult;
import io.netty.util.CharsetUtil;
import java.util.Random;
import org.junit.Assert;
import org.junit.Test;
import java.util.Random;
public class HttpInvalidMessageTest {
private final Random rnd = new Random();