What is the difference between them? What is the meaning of "Windows platform specific authentication code" ? What is the authentication code? Also what is " native Windows authentication " ? Where can I find more information about this? Any docs?
What is the meaning of authentication code? Could you please provide more info. On Wed, Jul 25, 2018 at 1:47 PM Oleg Kalnichevski <[email protected]> wrote: > On Tue, 2018-07-24 at 20:50 +0530, Sreyan Chakravarty wrote: > > I am on a Windows machine at work and am using HttpClient to make a > > request > > via a web proxy. But the problem is that I keep 407 Authentication > > required > > message. > > > > But if I do the same thing via the RestTemplate of Spring, which uses > > the > > vanilla java.net.URLConnection class, with supplying just the proxy > > address > > and port, it works fine. *It doesn't even need the user name and > > password > > for authentication. * > > > > Why does this work? Why does HttpClient fail? > > > > Doing some digging into the source I made out that HttpClient first > > opens a > > socket to the required address and then reads and writes from that > > socket. > > AFAIK, java.net.URLConnection does not do that. > > > > So my question is what does java.net.URLConnection do differently? > > What is > > the difference between opening a socket. > > > > Also how do I make HttpClient behave like java.net.URLConnection so > > that I > > can avoid the error. > > > > Clearly java.net.URLConnection is doing something right. > > > > Right or wrong, it uses Windows platform specific authentication code. > HttpClient supports native Windows authentication when running on > Windows family of OSes > > http://hc.apache.org/httpcomponents-client-4.5.x/httpclient-win/apidocs > /index.html > <http://hc.apache.org/httpcomponents-client-4.5.x/httpclient-win/apidocs/index.html> > > Oleg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Regards, Sreyan
