length = Long.parseLong(fixedLengthString);
} else if (transferEncodingString != null) {
length = -1;
}
AjpClientRequestClientStreamSinkChannel sinkChannel = connection.sendRequest(request.getMethod(), request.getPath(), request.getProtocol(), request.getRequestHeaders(), request, requestFinishListener);
currentRequest.setRequestChannel(sinkChannel);
AjpClientExchange.invokeReadReadyCallback(AjpClientExchange);
if (length == 0) {
//if there is no content we flush the response channel.
//otherwise it is up to the user
try {
sinkChannel.shutdownWrites();
if (!sinkChannel.flush()) {
handleFailedFlush(sinkChannel);
}
} catch (IOException e) {
handleError(e);
}