long contentLength = getRequestContentLength();
if ((contentLength == CONTENT_LENGTH_CHUNKED)
&& getEffectiveVersion().lessEquals(HttpVersion.HTTP_1_0)) {
throw new ProtocolException(
"Chunked transfer encoding not allowed for " +
getEffectiveVersion().toString());
}
this.requestEntity = generateRequestEntity();
if (requestEntity == null) {
LOG.debug("Request body is empty");
return true;
}
if ((this.repeatCount > 0) && !requestEntity.isRepeatable()) {
throw new ProtocolException(
"Unbuffered entity enclosing request can not be repeated.");
}
this.repeatCount++;