diff --git a/ChangeLog b/ChangeLog index 89c5b4cbc..e60eba580 100644 --- a/ChangeLog +++ b/ChangeLog @@ -48,6 +48,7 @@ 33. Fix scrobbling when Album is empty. 34. Fix duration of last track for split CUE files. 35. Move stream listings to github. +36. Fix local file playback on remote MPD when MPD's curl is using IPv6. 2.0.1 ----- diff --git a/http/httpsocket.cpp b/http/httpsocket.cpp index 3359728e8..efe0dc174 100644 --- a/http/httpsocket.cpp +++ b/http/httpsocket.cpp @@ -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) {