[mapserver-commits] r7790 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Jul 8 13:58:58 EDT 2008


Author: dmorissette
Date: 2008-07-08 13:58:57 -0400 (Tue, 08 Jul 2008)
New Revision: 7790

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maphttp.c
Log:
Allow building against Curl 7.10.6 (#571)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-07-07 20:03:52 UTC (rev 7789)
+++ trunk/mapserver/HISTORY.TXT	2008-07-08 17:58:57 UTC (rev 7790)
@@ -13,6 +13,9 @@
 Current Version (SVN Trunk):
 ----------------------------
 
+- Allow building against Curl 7.10.6 and older which lack CURLOPT_PROXYAUTH
+  option required for *_proxy_auth_type metadata (#571)
+
 - Avoid fatal error when creating new ShapeFileObj with MapScript (#2674)
 
 - Fixed problem with WMS INIMAGE exceptions vs AGG output formats (#2438)

Modified: trunk/mapserver/maphttp.c
===================================================================
--- trunk/mapserver/maphttp.c	2008-07-07 20:03:52 UTC (rev 7789)
+++ trunk/mapserver/maphttp.c	2008-07-08 17:58:57 UTC (rev 7790)
@@ -400,8 +400,6 @@
             && strlen(pasReqInfo[i].pszProxyAddress) > 0)
         {
             long    nProxyType     = CURLPROXY_HTTP;
-            long    nProxyAuthType = CURLAUTH_BASIC;
-            char    szUsernamePasswd[128];    
             
             curl_easy_setopt(http_handle, CURLOPT_PROXY,
                              pasReqInfo[i].pszProxyAddress);
@@ -430,8 +428,17 @@
                 && strlen(pasReqInfo[i].pszProxyUsername) > 0
                 && strlen(pasReqInfo[i].pszProxyPassword) > 0)
             {
+                char    szUsernamePasswd[128];    
+#ifdef CURLOPT_PROXYAUTH
+                long    nProxyAuthType = CURLAUTH_BASIC;
+                /* CURLOPT_PROXYAUTH available only in Curl 7.10.7 and up */
                 nProxyAuthType = msGetCURLAuthType(pasReqInfo[i].eProxyAuthType);
                 curl_easy_setopt(http_handle, CURLOPT_PROXYAUTH, nProxyAuthType);
+#else
+                /* We log an error but don't abort processing */
+                msSetError(MS_HTTPERR, "CURLOPT_PROXYAUTH not supported. Requires Curl 7.10.7 and up. *_proxy_auth_type setting ignored.", 
+                           "msHTTPExecuteRequests()");
+#endif /* CURLOPT_PROXYAUTH */ 
                 
                 snprintf(szUsernamePasswd, 127, "%s:%s",
                          pasReqInfo[i].pszProxyUsername,



More information about the mapserver-commits mailing list