/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
new DefaultedHttpParams(request.getParams(), this.params)); HttpStatus.SC_CONTINUE, context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); HttpStatus.SC_INTERNAL_SERVER_ERROR, context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); handleException(ex, response); response = this.responseFactory.newHttpResponse(ver, HttpStatus.SC_OK, context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); handleException(ex, response);
protected HttpParams getResponseParams(UpnpOperation operation) { HttpParams localParams = new BasicHttpParams(); return new DefaultedHttpParams(localParams, params); }
protected HttpParams getRequestParams(StreamRequestMessage requestMessage) { HttpParams localParams = new BasicHttpParams(); localParams.setParameter( CoreProtocolPNames.PROTOCOL_VERSION, requestMessage.getOperation().getHttpMinorVersion() == 0 ? HttpVersion.HTTP_1_0 : HttpVersion.HTTP_1_1 ); // DefaultHttpClient adds HOST header automatically in its default processor // Add the default user agent if not already set on the message if (!requestMessage.getHeaders().containsKey(UpnpHeader.Type.USER_AGENT)) { HttpProtocolParams.setUserAgent( localParams, getConfiguration().getUserAgentValue(requestMessage.getUdaMajorVersion(), requestMessage.getUdaMinorVersion()) ); } return new DefaultedHttpParams(localParams, globalParams); } }
public void setParameters(HttpParams defaultParms) { this.params = new DefaultedHttpParams(new BasicHttpParams(), defaultParms); }
public ReadLockHttpClient() { this.params = new DefaultedHttpParams(new BasicHttpParams(), httpParams); }
public ReadLockHttpClient() { this.params = new DefaultedHttpParams(new BasicHttpParams(), httpParams); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { final HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ @Override public HttpParams copy() { final HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { final HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { final HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
/** * Creates a copy of the local collection with the same default */ public HttpParams copy() { final HttpParams clone = this.local.copy(); return new DefaultedHttpParams(clone, this.defaults); }
new DefaultedHttpParams(request.getParams(), this.params)); HttpStatus.SC_CONTINUE, context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); HttpStatus.SC_INTERNAL_SERVER_ERROR, context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); handleException(ex, response); response = this.responseFactory.newHttpResponse(ver, HttpStatus.SC_OK, context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); context); response.setParams( new DefaultedHttpParams(response.getParams(), this.params)); handleException(ex, response);
/** * Closes the source side HTTP connection. * * @param conn HTTP server connection reference */ private void dropSourceConnection(NHttpServerConnection conn) { try { HttpContext httpContext = conn.getContext(); HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_REQUEST_TOO_LONG, "Payload Too Large"); response.setParams(new DefaultedHttpParams(sourceConfiguration.getHttpParams(), response.getParams())); response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_CLOSE); httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn); httpContext.setAttribute(ExecutionContext.HTTP_REQUEST, null); httpContext.setAttribute(ExecutionContext.HTTP_RESPONSE, response); sourceConfiguration.getHttpProcessor().process(response, httpContext); conn.submitResponse(response); SourceContext.updateState(conn, ProtocolState.CLOSED); conn.close(); } catch (Exception ex) { log.error(ex.getMessage(), ex); SourceContext.updateState(conn, ProtocolState.CLOSED); sourceConfiguration.getSourceConnections().shutDownConnection(conn, true); } }
public BasicHttpClient(final HttpParams config) throws IOException { params = new DefaultedHttpParams(config, HttpClientConfig.defaults()); ioReactor = new DefaultConnectingIOReactor(params.getIntParameter(DISPATCHING_THREADS, 1), params); sesionRequestHandler = new SesionRequestHandler();
HttpVersion.HTTP_1_1, HttpStatus.SC_BAD_REQUEST, "Bad request"); response.setParams( new DefaultedHttpParams(sourceConfiguration.getHttpParams(), response.getParams())); response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_CLOSE);