Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Unix/http/httpclientauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2562,7 +2562,9 @@ static char *_BuildInitialGssAuthHeader(_In_ HttpClient_SR_SocketData * self, MI
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;

if ((gai_result = getaddrinfo(self->hostname, "http", &hints, &info)) != 0)
// Use a port number rather than a service name (http), which relies on /etc/services, which may not be available.
// The port number is irrelevant anyway since we're only using info->ai_canonname below.
if ((gai_result = getaddrinfo(self->hostname, "80", &hints, &info)) != 0)
{
trace_HTTP_GetAddrInfoError(gai_strerror(gai_result));
return NULL;
Expand Down