GGRUNDY
asked on
InternetConnect http question
I'm haveing a bit of trouble understanding the WinInet InternetConnect function call as it applies to username & password for a http session.
The documentation says:
; a NULL parameter in HTTP causes the server to return an error
Is that really true!!?? and just what is InternetConnect doing at this point for a http session? Just opening a socket? If so what would it do with any username and password supplied anyway? Maybe save them up and use them in subsequent HttpOpenRequest?
Any insight into what is going on with respect to user details and the InternetConnect function as far as http is concerned would be greatly appreciated.
The documentation says:
; a NULL parameter in HTTP causes the server to return an error
Is that really true!!?? and just what is InternetConnect doing at this point for a http session? Just opening a socket? If so what would it do with any username and password supplied anyway? Maybe save them up and use them in subsequent HttpOpenRequest?
Any insight into what is going on with respect to user details and the InternetConnect function as far as http is concerned would be greatly appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Guys thanks for your comments thus far.
But I'm still pretty interested in what (if anything) it does with username & password in the case of internet connection.
I have since found a document which says that in the case of a HTTP connection InternetConnect doesn't go anywhere near the site at that point. http://msdn.microsoft.com/workshop/networking/wininet/overview/enable.asp
From the article
InternetConnect does not attempt to access or establish a connection to the specified site, except in the case of an ftp session.
I also note that MFC's CHttpConnection class seems quite keen to pass NULL parameters for Username and Password. So it is probably the documentation in error. (Although the above article repeats the fallacy).
(In fact I get the impression from the documentation of the InternetConnect function had an author with only a passing acquaintanceship with the English language).
But I'm still pretty interested in what (if anything) it does with username & password in the case of internet connection.
I have since found a document which says that in the case of a HTTP connection InternetConnect doesn't go anywhere near the site at that point. http://msdn.microsoft.com/workshop/networking/wininet/overview/enable.asp
From the article
InternetConnect does not attempt to access or establish a connection to the specified site, except in the case of an ftp session.
I also note that MFC's CHttpConnection class seems quite keen to pass NULL parameters for Username and Password. So it is probably the documentation in error. (Although the above article repeats the fallacy).
(In fact I get the impression from the documentation of the InternetConnect function had an author with only a passing acquaintanceship with the English language).
ASKER
Thanks for trying anyway guys
As for asking for the username/password at this early stage, well I guess its just so that it can cache it for use later on when a page requiring authentication is encountered.