On Tue, 2011-08-23 at 14:09 +0200, Christian Migowski wrote: > Hi, > > I need to use preeemptive authentication and was very frustrated to see > that the simple client.getParams().setAuthenticationPreemptive(true); > of older versions > was replaced by a block of not understandable code in the tutorial that > everyone now needs to implement in his code every time he needs this > functionality - very wrong way in my opinion. > >
When using preemptive authentication (especially indiscriminately like the old versions of HttpClient used to do) one better understand the security implications of their actions. If you do not understand what you are doing, do not use preemptive authentication. > I am writing now because the examples posted under > http://hc.apache.org/httpcomponents-client-ga/tutorial/html/authenticati > on.html and > http://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/ap > ache/http/examples/client/ClientPreemptiveBasicAuthentication.java > > are not working with the latest HttpClient 4.1.2 - > ClientContext.AUTH_CACHE and EntityUtils.consume are not available :( you are wrong http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/util/EntityUtils.html#consume%28org.apache.http.HttpEntity%29 http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/protocol/ClientContext.html#AUTH_CACHE Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
