401382 Prevent parseAvailable from parsing next chunk when previous has not been consumed. Handle no content-type in chunked request.

This commit is contained in:
Greg Wilkins 2013-02-21 14:57:36 +11:00
parent 27cad4960b
commit bed3ea04f8
2 changed files with 6 additions and 1 deletions

View File

@ -581,6 +581,12 @@ public class ProxyServlet implements Servlet
String hdr = (String)enm.nextElement();
String lhdr = hdr.toLowerCase();
if ("transfer-encoding".equals(lhdr))
{
if (request.getHeader("transfer-encoding").indexOf("chunk")>=0)
hasContent = true;
}
if (_DontProxyHeaders.contains(lhdr))
continue;
if (connectionHdr != null && connectionHdr.indexOf(lhdr) >= 0)

View File

@ -265,7 +265,6 @@ public class ProxyServletTest
"PUT /proxy/test HTTP/1.1\r\n"+
"Host: localhost:"+_connector.getLocalPort()+"\r\n"+
"Transfer-Encoding: chunked\r\n"+
"Content-Type: text/plain\r\n"+
"Connection: close\r\n"+
"\r\n"+
"A\r\n"+