Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11567 - in /trunk/libzypp: package/libzypp.changes zypp/media/MediaCurl.cc
  • From: dmacvicar@xxxxxxxxxxxxxxxx
  • Date: Mon, 03 Nov 2008 14:34:11 -0000
  • Message-id: <20081103143411.6BC0C2E94B@xxxxxxxxxxxxxxxx>
Author: dmacvicar
Date: Mon Nov 3 15:34:11 2008
New Revision: 11567

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11567&view=rev
Log:
merge contributions by Jon Nelson, thanks

Modified:
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/media/MediaCurl.cc

Modified: trunk/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11567&r1=11566&r2=11567&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Mon Nov 3 15:34:11 2008
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Mon Nov 3 15:30:53 CET 2008 - dmacvicar@xxxxxxx
+
+- merge contributions by Jon Nelson, the patches resolve
+ the following issues:
+- disable the "Pragma: nocache" header which is automatically
+ used by curl.
+ re-enables the use of a caching http proxy (like squid or others)
+ and corrects (bnc #326208)
+- don't generate an If-Modified-Since header if we don't have a
+ previous file to work with
+- don't generate a Proxy-Authenticate header if one is not called
+ for.
+
+-------------------------------------------------------------------
Fri Oct 31 14:01:57 CET 2008 - ma@xxxxxxx

- Do not save solver locks (by APPL_HIGH).

Modified: trunk/libzypp/zypp/media/MediaCurl.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/media/MediaCurl.cc?rev=11567&r1=11566&r2=11567&view=diff
==============================================================================
--- trunk/libzypp/zypp/media/MediaCurl.cc (original)
+++ trunk/libzypp/zypp/media/MediaCurl.cc Mon Nov 3 15:34:11 2008
@@ -658,10 +658,12 @@
}

_proxyuserpwd = unEscape( _proxyuserpwd );
- ret = curl_easy_setopt( _curl, CURLOPT_PROXYUSERPWD, _proxyuserpwd.c_str()
);
- if ( ret != 0 ) {
- disconnectFrom();
- ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
+ if ( ! _proxyuserpwd.empty() ) {
+ ret = curl_easy_setopt( _curl, CURLOPT_PROXYUSERPWD,
_proxyuserpwd.c_str() );
+ if ( ret != 0 ) {
+ disconnectFrom();
+ ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
+ }
}
}

@@ -704,8 +706,18 @@
ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
}

+ _customHeaders = curl_slist_append(_customHeaders, "Pragma:");
+
+ if ( !_customHeaders ) {
+ ZYPP_THROW(MediaCurlInitException(_url));
+ }
+
// now add the anonymous id header
_customHeaders = curl_slist_append(_customHeaders, anonymousIdHeader());
+
+ if ( !_customHeaders ) {
+ ZYPP_THROW(MediaCurlInitException(_url));
+ }

ret = curl_easy_setopt ( _curl, CURLOPT_HTTPHEADER, _customHeaders );

@@ -1192,9 +1204,11 @@
}

// set IFMODSINCE time condition (no download if not modified)
- curl_easy_setopt(_curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
- curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, PathInfo(target).mtime());
-
+ if( PathInfo(target).isExist() ) {
+ curl_easy_setopt(_curl, CURLOPT_TIMECONDITION,
CURL_TIMECOND_IFMODSINCE);
+ curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, PathInfo(target).mtime());
+ }
+
string destNew = target.asString() + ".new.zypp.XXXXXX";
char *buf = ::strdup( destNew.c_str());
if( !buf)

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
This Thread
  • No further messages