[6/6] wininet: Handle INTERNET_INVALID_PORT_NUMBER in HttpOpenRequest.
Jacek Caban
jacek at codeweavers.com
Tue Apr 26 07:44:09 CDT 2016
Hi Sebastian,
On 04/25/16 21:46, Sebastian Lackner wrote:
> - request->server = get_server(session->hostName, session->hostPort, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
> + port = session->hostPort;
> + if (port == INTERNET_INVALID_PORT_NUMBER)
> + {
> + port = (session->hdr.dwFlags & INTERNET_FLAG_SECURE) ?
> + INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT;
> + }
> +
> + request->server = get_server(session->hostName, port, (dwFlags & INTERNET_FLAG_SECURE) != 0, TRUE);
Note that get_server already has code to deal with
INTERNET_INVALID_PORT_NUMBER, so it would be enough to handle https case
there. However, given that all other callers have valid port numbers, I
agree that it would be cleaner to do that in HTTP_HttpOpenRequestW
instead. Given that your moving the logic around, please remove no
longer needed code there.
Thanks,
Jacek
More information about the wine-devel
mailing list