MSXML ServerHTTPRequest + authenticated proxy + authenticated web server => doesn't work

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
I use the MSXML library mainly as a HTTP client. My target language is proprietary, so I wont talk anymore about it, and I use VBS to reproduce the problem.
From the network I work, I must use a proxy to access outside, and this proxy needs an authentication.
The target website need authentication too, not the same account/password than proxy, of course.
Here are the tests case I ran :
IE7 - no proxy - public website => OK (seriously? ;-) )
IE7 - no proxy - authenticated website => OK
VBS/MSXML - no proxy - public website => OK
VBS/MSXML - no proxy - authenticated website => OK
IE7 - proxy - public website => OK<br/>

IE7 - proxy - authenticated website => OK
VBS/MSXML - proxy - public website => OK
VBS/MSXML - proxy - authenticated website => !NOT OK! I get an error 407, proxy need auth.

I use the function setProxy / setProxyAuthentication for proxy authentication
http://msdn.microsoft.com/en-us/library/ms760236(v=vs.85).aspx
and open() parameters for target web site auth
http://msdn.microsoft.com/en-us/library/ms763809(v=vs.85).aspx

I inspected with a web debugger : fiddler, to find out what was going on :
First query header include Proxy-Authorization parameter, but no authorization. Target server answers 401, give me a login/password.
Ok, MSXML does a retry, pass the login/password with the header Authorization, but this time no Proxy-Authorization... this is the problem I think.

I ran a second time with IE and proxy, first query no auth header, proxy replies 407, IE prompt me a first time for login/password, second query with Proxy-Authorization header, this time target server replies 401, IE prompt me for a second login/pwd,
and this time, the headers include BOTH Proxy-Authorization AND Authorization

What do you think? Is it a bug? How the declare it to microsoft dev team?


View the full article
 
Back
Top