[22771] trunk/base/src/pextlib1.0/curl.c
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 13 20:14:54 PDT 2007
Revision: 22771
http://trac.macosforge.org/projects/macports/changeset/22771
Author: eridius at macports.org
Date: 2007-03-13 20:14:54 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
Pextlib curl command needs to send a user-agent.
I picked `MacPorts libcurl/[libcurl version]' - if you have a good idea how to encode the MacPorts version number in there without duplicating it in source, let me know (autoconf can do that, but 'tis ugly).
Fixes #7563
Modified Paths:
--------------
trunk/base/src/pextlib1.0/curl.c
Modified: trunk/base/src/pextlib1.0/curl.c
===================================================================
--- trunk/base/src/pextlib1.0/curl.c 2007-03-14 02:48:22 UTC (rev 22770)
+++ trunk/base/src/pextlib1.0/curl.c 2007-03-14 03:14:54 UTC (rev 22771)
@@ -251,6 +251,13 @@
break;
}
+ /* -A option */
+ theCurlCode = curl_easy_setopt(theHandle, CURLOPT_USERAGENT, "MacPorts libcurl/" LIBCURL_VERSION);
+ if (theCurlCode != CURLE_OK) {
+ theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
+ break;
+ }
+
/* write to the file */
theCurlCode = curl_easy_setopt(theHandle, CURLOPT_WRITEDATA, theFile);
if (theCurlCode != CURLE_OK) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070313/9b06363d/attachment.html
More information about the macports-changes
mailing list