rendered paste body{
QHttpRequestHeader header( "GET", path );
header.setValue( "Accept-Encoding", "gzip" );
unsigned char hash[33] = {0};
unsigned char unsignedPath[ path.length() ] = {0};
for( uint i = 0; i< path.length() ; i++ ){
unsignedPath[i] = reinterpret_cast<unsigned char>(path.ascii()[i]);
}
GenerateHash(3, unsignedPath , 2, hash, s_requestId);
header.setValue( "User-Agent", "iTunes/4.6 (Windows; N)" );
header.setValue( "Client-DAAP-Version", "3.0" );
for( int i = 0; i < 33 ; i++ ){
hash[i] = reinterpret_cast<const char*>(hash[i]);
}
header.setValue( "Client-DAAP-Validation", reinterpret_cast<const char*>(hash) );
header.setValue( "Client-DAAP-Access-Index", "2" );
header.setValue( "Client-DAAP-Request-ID", QString::number( s_requestId ) );
request( header );
debug() << hash << ' ' << path.ascii() << ' ' << reinterpret_cast<const unsigned char*>(path.ascii()) << endl;
}