List of usage examples for org.apache.http.conn.params ConnConnectionPNames MAX_STATUS_LINE_GARBAGE
String MAX_STATUS_LINE_GARBAGE
To view the source code for org.apache.http.conn.params ConnConnectionPNames MAX_STATUS_LINE_GARBAGE.
Click Source Link
From source file:org.vietspider.net.apache.DefaultResponseParser.java
public DefaultResponseParser(final SessionInputBuffer buffer, final LineParser parser, final HttpResponseFactory responseFactory, final HttpParams params) { if (buffer == null) { throw new IllegalArgumentException("Session input buffer may not be null"); }/*from w w w. j ava2 s . com*/ if (params == null) { throw new IllegalArgumentException("HTTP parameters may not be null"); } this._sessionBuffer = buffer; // this.timeoutSocket = params.getBooleanParameter("vietspider.socket.timeout", false); this.maxHeaderCount = params.getIntParameter(CoreConnectionPNames.MAX_HEADER_COUNT, -1); this.maxLineLen = params.getIntParameter(CoreConnectionPNames.MAX_LINE_LENGTH, -1); this.lineParser = (parser != null) ? parser : BasicLineParser.DEFAULT; if (responseFactory == null) { throw new IllegalArgumentException("Response factory may not be null"); } this.responseFactory = responseFactory; this.lineBuf = new CharArrayBuffer(128); this.maxGarbageLines = params.getIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, Integer.MAX_VALUE); }
From source file:org.openqa.selenium.remote.internal.HttpClientFactory.java
public HttpParams getHttpParams() { HttpParams params = new BasicHttpParams(); HttpConnectionParams.setSoReuseaddr(params, true); HttpConnectionParams.setConnectionTimeout(params, 120 * 1000); HttpConnectionParams.setSoTimeout(params, TIMEOUT_THREE_HOURS); params.setIntParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, 0); HttpConnectionParams.setStaleCheckingEnabled(params, true); return params; }