// Check for expect-continue handshake. We have to flush the
// headers and wait for an 100-continue response to handle it.
// If we get a different response, we must not send the entity.
boolean sendentity = true;
final HttpVersion ver = request.getRequestLine().getHttpVersion();
if (entityEnclRequest.expectContinue() &&
ver.greaterEquals(HttpVersion.HTTP_1_1)) {
conn.flush();
// As suggested by RFC 2616 section 8.2.3, we don't wait for a
// 100-continue response forever. On timeout, send the entity.