]> granicus.if.org Git - curl/commitdiff
modified to the new cookie function proto
authorDaniel Stenberg <daniel@haxx.se>
Wed, 30 Apr 2003 17:05:19 +0000 (17:05 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 30 Apr 2003 17:05:19 +0000 (17:05 +0000)
lib/transfer.c

index cd9930c0f87a684c3fde3b63b926c18e1735ea91..2cfbfae3bc5c96c69d9377ce11c3ea99c47a46c6 100644 (file)
@@ -686,7 +686,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
             }
             else if(data->cookies &&
                     checkprefix("Set-Cookie:", k->p)) {
-              Curl_cookie_add(data->cookies, TRUE, k->p+11, conn->name);
+              Curl_cookie_add(data->cookies, TRUE, k->p+11,
+                              /* If there is a custom-set Host: name, use it
+                                 here, or else use real peer host name. */
+                              conn->allocptr.cookiehost?
+                              conn->allocptr.cookiehost:conn->name,
+                              conn->ppath);
             }
             else if(checkprefix("Last-Modified:", k->p) &&
                     (data->set.timecondition || data->set.get_filetime) ) {