Explicitly set default TcpNoDelay and socket buffer parameter values

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@764586 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2009-04-13 19:52:18 +00:00
parent e7eacf8764
commit c74443f68b
1 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,7 @@ import org.apache.http.impl.cookie.NetscapeDraftSpecFactory;
import org.apache.http.impl.cookie.RFC2109SpecFactory;
import org.apache.http.impl.cookie.RFC2965SpecFactory;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.BasicHttpContext;
@ -134,6 +135,10 @@ public class DefaultHttpClient extends AbstractHttpClient {
HTTP.DEFAULT_CONTENT_CHARSET);
HttpProtocolParams.setUseExpectContinue(params,
true);
HttpConnectionParams.setTcpNoDelay(params,
Boolean.TRUE);
HttpConnectionParams.setSocketBufferSize(params,
8192);
// determine the release version from packaged version info
final VersionInfo vi = VersionInfo.loadVersionInfo