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 // Let's add the user-agent header on every request HttpProtocolParams.setUserAgent( localParams, getConfiguration().getUserAgentValue(requestMessage.getUdaMajorVersion(), requestMessage.getUdaMinorVersion()) ); return new DefaultedHttpParams(localParams, globalParams); }
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); }
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 // Let's add the user-agent header on every request HttpProtocolParams.setUserAgent(localParams, getConfiguration() .getUserAgentValue(requestMessage.getUdaMajorVersion(), requestMessage.getUdaMinorVersion())); return new DefaultedHttpParams(localParams, globalParams); }
protected HttpParams getResponseParams(UpnpOperation operation) { HttpParams localParams = new BasicHttpParams(); return new DefaultedHttpParams(localParams, params); }