HttpTester.parseResponse(Input) returns on TE/Chunked now

This commit is contained in:
Joakim Erdfelt 2017-02-03 04:53:03 -07:00
parent 43c203b606
commit 247d273e94
1 changed files with 12 additions and 0 deletions

View File

@ -25,10 +25,13 @@ import java.nio.ByteBuffer;
import java.nio.channels.ReadableByteChannel;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
/**
@ -59,6 +62,8 @@ import org.eclipse.jetty.util.StringUtil;
*/
public class HttpTester
{
private final static Logger LOG = Log.getLogger(HttpTester.class);
private HttpTester()
{
}
@ -243,6 +248,13 @@ public class HttpTester
if (r.isComplete())
return r;
String te = r.get(HttpHeader.TRANSFER_ENCODING);
if(te != null && te.toLowerCase(Locale.ENGLISH).contains("chunked"))
return r;
LOG.info("Incomplete Response: (parser={}) {}", parser, r);
in.setHttpParser(parser);
return null;
}