aboutsummaryrefslogtreecommitdiff
path: root/lib/hostthre.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-10-21 19:21:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-10-21 19:21:19 +0000
commitbfa9c42c2561fd8ff6504cfd94a2df379df9b77f (patch)
treece131dac66347bec5f800cff180475b96513f7ee /lib/hostthre.c
parent9d98f97e1b1666f84d7623a41264a999a22bd27e (diff)
Bradford Bruce made the windows resolver code properly return
CURLE_COULDNT_RESOLVE_PROXY and CURLE_COULDNT_RESOLVE_HOST on resolving errors (as documented).
Diffstat (limited to 'lib/hostthre.c')
-rw-r--r--lib/hostthre.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/hostthre.c b/lib/hostthre.c
index c364ebfab..eb8e02e12 100644
--- a/lib/hostthre.c
+++ b/lib/hostthre.c
@@ -660,15 +660,22 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
rc = CURLE_OUT_OF_MEMORY;
failf(data, "Could not resolve host: %s", curl_easy_strerror(rc));
}
+ else if(conn->async.done) {
+ if(conn->bits.httpproxy) {
+ failf(data, "Could not resolve proxy: %s; %s",
+ conn->proxy.dispname, Curl_strerror(conn, conn->async.status));
+ rc = CURLE_COULDNT_RESOLVE_PROXY;
+ }
+ else {
+ failf(data, "Could not resolve host: %s; %s",
+ conn->host.name, Curl_strerror(conn, conn->async.status));
+ rc = CURLE_COULDNT_RESOLVE_HOST;
+ }
+ }
else if (td->thread_status == (DWORD)-1 || conn->async.status == NO_DATA) {
failf(data, "Resolving host timed out: %s", conn->host.name);
rc = CURLE_OPERATION_TIMEDOUT;
}
- else if(conn->async.done) {
- failf(data, "Could not resolve host: %s; %s",
- conn->host.name, Curl_strerror(conn,conn->async.status));
- rc = CURLE_COULDNT_RESOLVE_HOST;
- }
else
rc = CURLE_OPERATION_TIMEDOUT;
}