Github user shivzone commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/951#discussion_r81801574 --- Diff: src/backend/access/external/libchurl.c --- @@ -312,16 +313,29 @@ CHURL_HANDLE churl_init(const char* url, CHURL_HEADERS headers) /* needed to resolve localhost */ if (strstr(url, LocalhostIpV4) != NULL) { - struct curl_slist *resolve_hosts = NULL; - char *pxf_host_entry = (char *) palloc0(strlen(pxf_service_address) + strlen(LocalhostIpV4Entry) + 1); - strcat(pxf_host_entry, pxf_service_address); - strcat(pxf_host_entry, LocalhostIpV4Entry); - resolve_hosts = curl_slist_append(NULL, pxf_host_entry); - set_curl_option(context, CURLOPT_RESOLVE, resolve_hosts); - pfree(pxf_host_entry); - } + //get loopback interface ip address + char* loopback_addr = get_loopback_ip_addr(); + elog(DEBUG1, "Loopback interface IP address: %s", loopback_addr); + //find host start position in url + char* start = strstr(url, LocalhostIpV4); --- End diff -- Would be good if we can move below lines till you contract the new url with the loopback_addr to a new function in pxfutils.c named replaceUri(char *uri, char *hostname) and invoke replaceUri(uri, loopback_addr)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---