Merged revisions 4994-4997 via svnmerge from
authorJan Kupec <jkupec@suse.cz>
Fri, 9 Feb 2007 17:36:34 +0000 (17:36 +0000)
committerJan Kupec <jkupec@suse.cz>
Fri, 9 Feb 2007 17:36:34 +0000 (17:36 +0000)
http://svn.suse.de/svn/zypp/branches/SuSE-Linux-10_2-Branch/libzypp

........
  r4994 | jkupec | 2007-02-09 14:33:47 +0100 (Fri, 09 Feb 2007) | 1 line

  gettext and rpath problem fix
........
  r4996 | jkupec | 2007-02-09 15:01:17 +0100 (Fri, 09 Feb 2007) | 3 lines

  Setting allowed authentication methods to "basic,digest" if none
  provided in URL (#243006)
........
  r4997 | jkupec | 2007-02-09 15:06:03 +0100 (Fri, 09 Feb 2007) | 1 line

  .changes
........

Makefile.cvs
configure.ac
zypp/media/MediaCurl.cc

index 39f9d34..2b19fde 100644 (file)
@@ -24,6 +24,7 @@ configure: init
 
 init:
        rm -rf autom4te.cache
+       touch config.rpath # fix from packagers@suse.de 2006-09-01
        autoreconf --force --install --symlink --verbose
 
 reconf: init
index 1942da1..b64cc65 100644 (file)
@@ -195,7 +195,7 @@ AC_CHECK_HEADERS([popt.h],
         AC_MSG_ERROR([popt header not found. please install popt-devel.]))
 
 dnl internationalization macros
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
 
 dnl ==================================================
 dnl checks for typedefs
index 9beb602..1c3ff34 100644 (file)
@@ -441,12 +441,16 @@ void MediaCurl::attachTo (bool next)
       ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
     }
 
-    if( !_url.getQueryParam("auth").empty() &&
-       (_url.getScheme() == "http" || _url.getScheme() == "https"))
+    if(_url.getScheme() == "http" || _url.getScheme() == "https")
     {
       std::vector<std::string>                 list;
       std::vector<std::string>::const_iterator it;
-      str::split(_url.getQueryParam("auth"), std::back_inserter(list), ",");
+
+      string use_auth = _url.getQueryParam("auth");
+      if( use_auth.empty())
+        use_auth = "digest,basic";
+
+      str::split(use_auth, std::back_inserter(list), ",");
 
       long auth = CURLAUTH_NONE;
       for(it = list.begin(); it != list.end(); ++it)
@@ -491,8 +495,8 @@ void MediaCurl::attachTo (bool next)
 
       if( auth != CURLAUTH_NONE)
       {
-       DBG << "Enabling HTTP authentication methods: "
-           << _url.getQueryParam("auth") << std::endl;
+        DBG << "Enabling HTTP authentication methods: " << use_auth
+            << " (CURLOPT_HTTPAUTH=" << auth << ")" << std::endl;
 
        ret = curl_easy_setopt( _curl, CURLOPT_HTTPAUTH, auth);
        if ( ret != 0 ) {
@@ -1250,3 +1254,4 @@ int MediaCurl::progressCallback( void *clientp, double dltotal, double dlnow,
 
   } // namespace media
 } // namespace zypp
+// 
\ No newline at end of file