Discussion:
wininet and multihomed hosts.
(too old to reply)
Monster
2006-09-13 18:07:17 UTC
Permalink
I have an issue with wininet (httpsendrequest) and the behavour with
multihomed hosts. According to INTERNET_OPTION_CONNECT_RETRIES and
INTERNET_OPTION_CONNECT_TIMEOUT if the hostname resolves to multiple ip
addresses, wininet should retry each IP until it gets to one that works. The
behaviour I've observed with httpsendrequest seems contrary to the above
options.

It will attempt the first IP in the list, if it fails it returns an error.
However, if I keep retrying the request it will do a round-robin loop to the
next ip and and the next one after that.

Shouldn't httpsendrequest automatically attempt all the IPs before returning
an error? why does calling httpsendrequest again try the next IP in the
list? that's not what the documentation says. In addition to that, as long
as I keep calling httpsendrequest it will just keep looping on the ips
infinitely.
Vladimir Scherbina
2006-09-14 08:14:28 UTC
Permalink
Monster,

Yes, HttpSendRequest should not fail each time the connection is failed if
you specify INTERNET_OPTION_CONNECT_RETRIES and the host has multiple ips.
Are you sure that host have more then one IP? What is the OS version?
--
Vladimir
Post by Monster
I have an issue with wininet (httpsendrequest) and the behavour with
multihomed hosts. According to INTERNET_OPTION_CONNECT_RETRIES and
INTERNET_OPTION_CONNECT_TIMEOUT if the hostname resolves to multiple ip
addresses, wininet should retry each IP until it gets to one that works.
The behaviour I've observed with httpsendrequest seems contrary to the
above options.
It will attempt the first IP in the list, if it fails it returns an error.
However, if I keep retrying the request it will do a round-robin loop to
the next ip and and the next one after that.
Shouldn't httpsendrequest automatically attempt all the IPs before
returning an error? why does calling httpsendrequest again try the next IP
in the list? that's not what the documentation says. In addition to that,
as long as I keep calling httpsendrequest it will just keep looping on the
ips infinitely.
Loading...