final long contentLength = Long.parseLong(requestContentLength);
if (contentLength == 0L) {
UndertowLogger.REQUEST_LOGGER.trace("No content, starting next request");
// no content - immediately start the next request, returning an empty stream for this one
Connectors.terminateRequest(httpServerExchange);
return new EmptyStreamSourceConduit(conduit.getReadThread());
} else {
length = contentLength;
}
} else {
UndertowLogger.REQUEST_LOGGER.trace("No content length or transfer coding, starting next request");
// no content - immediately start the next request, returning an empty stream for this one
Connectors.terminateRequest(exchange);
return new EmptyStreamSourceConduit(conduit.getReadThread());
}
return new AjpServerRequestConduit(conduit, exchange, responseConduit, length, new ConduitListener<AjpServerRequestConduit>() {
@Override
public void handleEvent(AjpServerRequestConduit channel) {
Connectors.terminateRequest(exchange);