else
curl = new MediaCurl (url,preferred_attach_point);
- UrlResolverPlugin::HeaderList::const_iterator it;
- for (it = custom_headers.begin();
- it != custom_headers.end();
- ++it) {
- std::string header = it->first + ": " + it->second;
+ for ( const auto & el : custom_headers ) {
+ std::string header { el.first };
+ header += ": ";
+ header += el.second;
MIL << "Added custom header -> " << header << endl;
- curl->settings().addHeader(header);
+ curl->settings().addHeader( std::move(header) );
}
_handler = curl;
}
// filename is interpreted relative to the attached url
// and a path prefix is preserved to destination
void
-MediaAccess::provideFile( const Pathname & filename ) const
+MediaAccess::provideFile(const Pathname & filename , const ByteCount &expectedFileSize) const
{
if ( !_handler ) {
ZYPP_THROW(MediaNotOpenException("provideFile(" + filename.asString() + ")"));
}
- _handler->provideFile( filename );
+ _handler->provideFile( filename, expectedFileSize );
}
void
try {
media.open( u );
media.attach();
- media._handler->provideFileCopy( base, to );
+ media._handler->provideFileCopy( base, to, 0 );
media.release();
}
catch (const MediaException & excpt_r)