Fix local file playback on remote MPD when MPD's curl is using IPv6
Issue #907
This commit is contained in:
committed by
Craig Drummond
parent
65d7e28e9c
commit
84ca06c2a5
@@ -273,9 +273,12 @@ void HttpSocket::readClient()
|
||||
return;
|
||||
}
|
||||
|
||||
static const QLatin1String constIpV6Prefix("::ffff:");
|
||||
|
||||
QString peer=socket->peerAddress().toString();
|
||||
QString ifaceAddress=serverAddress().toString();
|
||||
bool hostOk=peer==ifaceAddress || peer==mpdAddr || peer==QLatin1String("127.0.0.1") || peer==QLatin1String("::ffff:127.0.0.1");
|
||||
bool hostOk=peer==ifaceAddress || peer==mpdAddr || peer==(constIpV6Prefix+mpdAddr) ||
|
||||
peer==QLatin1String("127.0.0.1") || peer==(constIpV6Prefix+QLatin1String("127.0.0.1"));
|
||||
|
||||
DBUG << "peer:" << peer << "mpd:" << mpdAddr << "iface:" << ifaceAddress << "ok:" << hostOk;
|
||||
if (!hostOk) {
|
||||
|
||||
Reference in New Issue
Block a user