20 MIL <<
"Entering DetectMetalinkState for url: " <<
parent._spec.url() << std::endl;
29 const auto &
url = sm._spec.url();
31 MIL_MEDIA <<
"Detecting if metalink is available on " <<
url << std::endl;
36 _request->transferSettings() = sm._spec.settings();
37 _request->transferSettings().addHeader(
"Accept: */*, application/metalink+xml, application/metalink4+xml");
41 sm._requestDispatcher->enqueue(
_request );
66 WAR << req.
nativeHandle() <<
" " <<
"Detecing if metalink is possible for url " << req.
url() <<
" failed with error " << err.
toString() <<
" falling back to download without metalink." << std::endl;
76 _gotMetalink = ( cType.find(
"application/metalink+xml") == 0 || cType.find(
"application/metalink4+xml") == 0 );
91#if ENABLE_ZCHUNK_COMPRESSION
98#if ENABLE_ZCHUNK_COMPRESSION
99 bool DetectMetalinkState::toZckHeadDownloadGuard()
const
104 std::shared_ptr<DLZckHeadState> DetectMetalinkState::toDLZckHeadState()
DownloadPrivate & stateMachine()
Signal< void(Download &req, off_t dlnow)> _sigAlive
Signal< void(Download &req)> _sigStarted
The NetworkRequestError class Represents a error that occured in.
std::string toString() const
toString Returns a string representation of the error
bool isError() const
isError Will return true if this is a actual error
std::string contentType() const
Returns the content type as reported from the server.
bool hasError() const
Checks if there was a error with the request.
void * nativeHandle() const
const std::string & lastRedirectInfo() const
Url clearQueryString(const Url &url)