Strange WinINet behavior
- From: Gigi Chu <GigiChu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Nov 2008 11:20:05 -0800
When using WinINet APIs in synchronous mode and if HttpSendRequest is called
with any additional HTTP headers, then WinINet seems to use a cached IP
address for the host name that we specified in InternetConnect even after the
DNS cache timeout (configured using the method specified by
http://support.microsoft.com/kb/263558) has expired. This problem does not
occur if we use asynchronous mode (InternetOpen with INTERNET_FLAG_ASYNC
flag) or if we don’t specify any additional HTTP headers in HttpSendRequest.
Clearing the IP DNS cache (via ipconfig /flushdns) does not seem to help,
because WinINet seem to keep its own DNS cache. The only work-around that
works for me currently is to restart the application, or change the code to
use asynchronous mode, or to not pass additional headers in HttpSendRequest.
Has anyone seen this behavior before?
Thanks.
.
- Follow-Ups:
- Re: Strange WinINet behavior
- From: Volodymyr M. Shcherbyna
- Re: Strange WinINet behavior
- Prev by Date: Re: UDP checksum c/c++ source
- Next by Date: Re: Retrieving ethernet data in Windows XP sent from Linux with ra
- Previous by thread: UDP checksum c/c++ source
- Next by thread: Re: Strange WinINet behavior
- Index(es):
Relevant Pages
|