Does Basic User Authentication require 2-Phase communiation?

Posted by RED SOFT ADAIR-StefanWoe on Server Fault See other posts from Server Fault or by RED SOFT ADAIR-StefanWoe
Published on 2014-06-04T07:57:45Z Indexed on 2014/06/04 9:26 UTC
Read the original article Hit count: 213

My Application connects to the Internet to HTTP Services using boost::asio. Recently we added support for HTTP Proxys and Basic User Authentication. We implemented Basic User Authentication by just sending Authentication parameters with every HTTP call if a user configured a proxy in our program. Parameters are sent as described here:

Authorization: Basic <base64 Encoded username:password>

This works at least for one user and his proxy server. Other users report that their Proxy server replys with

407 Proxy Authentication Required

My guess is that some proxy servers accept 1 one phase authentication and that others don't. I do not find any information that a 2 Phase communication is requested where the access always is denied for the first call by returning 407 and that only a second call is accepted.

Our program yet does not retry the call if a 407 has been returned. Do we have to add this?

I asked this question before on stackoverflow but did not get a sufficient answer.

© Server Fault or respective owner

Related posts about proxy

Related posts about http