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
On 26.04.2016 14:44, Jacek Caban wrote:
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
I will resend a fix for this after the first bunch of patches is accepted. Removing the code from get_server() would probably not be sufficient, it looks like HTTP_DealWithProxy() might also depend on it.
Regards, Sebastian
On 04/26/16 16:13, Sebastian Lackner wrote:
On 26.04.2016 14:44, Jacek Caban wrote:
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
I will resend a fix for this after the first bunch of patches is accepted. Removing the code from get_server() would probably not be sufficient, it looks like HTTP_DealWithProxy() might also depend on it.
In HTTP_DealWithProxy it should be probably removed as well, because InternetCrackUrl should take care of that.
Jacek