Set session buffer size to 8192, if not set explicitly

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@764911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2009-04-14 18:19:52 +00:00
parent a23c18ac1e
commit c1a13dea57

View File

@ -166,6 +166,9 @@ protected SessionInputBuffer createSessionInputBuffer(
final Socket socket,
int buffersize,
final HttpParams params) throws IOException {
if (buffersize == -1) {
buffersize = 8192;
}
SessionInputBuffer inbuffer = super.createSessionInputBuffer(
socket,
buffersize,
@ -182,6 +185,9 @@ protected SessionOutputBuffer createSessionOutputBuffer(
final Socket socket,
int buffersize,
final HttpParams params) throws IOException {
if (buffersize == -1) {
buffersize = 8192;
}
SessionOutputBuffer outbuffer = super.createSessionOutputBuffer(
socket,
buffersize,