[84351] trunk/base/src/pextlib1.0/curl.c

jmr at macports.org jmr at macports.org
Fri Sep 23 01:37:14 PDT 2011


Revision: 84351
          http://trac.macports.org/changeset/84351
Author:   jmr at macports.org
Date:     2011-09-23 01:37:09 -0700 (Fri, 23 Sep 2011)
Log Message:
-----------
work around broken libcurl env var handling in 10.6

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/curl.c

Modified: trunk/base/src/pextlib1.0/curl.c
===================================================================
--- trunk/base/src/pextlib1.0/curl.c	2011-09-23 07:59:02 UTC (rev 84350)
+++ trunk/base/src/pextlib1.0/curl.c	2011-09-23 08:37:09 UTC (rev 84351)
@@ -237,6 +237,20 @@
 			break;
 		}
 
+#if LIBCURL_VERSION_NUM == 0x071307
+        /* FTP_PROXY workaround for Snow Leopard */
+        if (strncmp(theURL, "ftp:", 4) == 0) {
+            char *ftp_proxy = getenv("FTP_PROXY");
+            if (ftp_proxy) {
+                theCurlCode = curl_easy_setopt(theHandle, CURLOPT_PROXY, ftp_proxy);
+                if (theCurlCode != CURLE_OK) {
+                    theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+                    break;
+                }
+            }
+        }
+#endif
+
 		/* -L option */
 		theCurlCode = curl_easy_setopt(theHandle, CURLOPT_FOLLOWLOCATION, 1);
 		if (theCurlCode != CURLE_OK) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110923/dfa42f5b/attachment.html>


More information about the macports-changes mailing list