Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2007 Dec : Effects of INTERNET_FLAG_EXISTING_CONNECT and Basic Authentication

www.cryer.info
Managed Newsgroup Archive

Effects of INTERNET_FLAG_EXISTING_CONNECT and Basic Authentication

Subject:Effects of INTERNET_FLAG_EXISTING_CONNECT and Basic Authentication
Posted by:"LizardWiz" (lizardw..@discussions.microsoft.com)
Date:Thu, 6 Dec 2007 10:48:06

Can anyone tell me how INTERNET_FLAG_EXISTING_CONNECT flag works in the
header?  I have a system that I am communicating with that claims that
sometimes when I send a HTTP get using WinInet that the authentication is
left out of the internet header.

Is it possible that the connection does not send the authentication in the
header if somehow it determines that it has successfully reused an existing
connection?

Thanks in advance if anyone can helpme with this...

Here is a sample of how I am using WinInet in C++, it is pretty standard:

CInternetSession m_InternetSession;
CHttpConnection* m_pConnection = NULL;
CHttpFile* m_pFile = NULL;
DWORD m_HttpRequestFlags = INTERNET_FLAG_EXISTING_CONNECT |
INTERNET_FLAG_RELOAD | INTERNET_FLAG_DONT_CACHE;

m_pConnection = m_InternetSession.GetHttpConnection(strHTTPSiteConnection,
nHTTPSitePort, strHTTPSiteUser, strHTTPSitePassword);

m_pFile = m_pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,
(LPCSTR)m_strURL, NULL, NULL, NULL, NULL, m_HttpRequestFlags);

m_pFile->SendRequest();

--
~LizardWiz()

Replies:

www.cryer.info
Managed Newsgroup Archive