Yes, InternetOpenUrl (and HttpSendRequest) will follow HTTP redirects.
(However, WinInet may not automatically follow HTTPS to HTTP, or HTTP to
HTTPS, redirects unless the application specifies the
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP[S] flags.)
Automatic HTTP redirect following may be disabled by specifying the
INTERNET_FLAG_NO_AUTO_REDIRECT flag to InternetOpenUrl (or HttpOpenRequest)
to let the application manually handle a redirect response. By default,
InternetOpenUrl will follow up to 100 redirects. There is no way via the
WinInet API to override the 100 redirect maximum limit, but it can be
configured by setting a registry key, although this will affect all
WinInet-based applications, like Internet Explorer, for the current user.
The registry value is:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings : MaxHttpRedirects (REG_DWORD)
- Stephen
Post by p***@gmail.comDoes InternetOpenUrl follow HTTP 301/302/303/307 redirects? If so, is
there a way to set how many times it will try following it?