-------------------------------------------------------------------
+Wed Nov 12 14:31:20 CET 2008 - ma@suse.de
+
+- Take care to always reset CURLOPT_TIMECONDITION to prevent incomplete
+ downloads. (bnc #444109)
+- revision 11656
+- version 5.23.0 (23)
+
+-------------------------------------------------------------------
Wed Nov 12 13:19:02 CET 2008 - ma@suse.de
- Check for modaliases below /sys (bnc #430179)
return _value.c_str();
}
-
+
static const char *const agentString()
{
// we need to add the release and identifier to the
// The target could be not initialized, and then this information
// is not available.
Target_Ptr target = zypp::getZYpp()->getTarget();
-
+
static const std::string _value(
str::form(
"ZYpp %s (curl %s) %s"
}
ret = curl_easy_setopt ( _curl, CURLOPT_HTTPHEADER, _customHeaders );
-
+
if ( ret != 0) {
disconnectFrom();
ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
curl_slist_free_all(_customHeaders);
_customHeaders = 0L;
}
-
+
if ( _curl )
{
curl_easy_cleanup( _curl );
}
// set IFMODSINCE time condition (no download if not modified)
- if( PathInfo(target).isExist() ) {
- 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());
}
-
+ else
+ {
+ curl_easy_setopt(_curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_NONE);
+ curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, 0);
+ }
+
string destNew = target.asString() + ".new.zypp.XXXXXX";
char *buf = ::strdup( destNew.c_str());
if( !buf)