The recent iTunes 9.1 update from Apple came with a bug that breaks compatibility with the Dansguardian web content filter and results in an Can’t Connect to the iTunes Store error message from iTunes.
What is happening is that iTunes requests a URL with a dot after the hostname:
http://ax.init.itunes.apple.com./
And dansguardian rejects it as a malformed URL (since it is).
You can test it by typing:
http://apple.com./
into a browser (note the period/dot after com
).
If you get a Dansguardian Malformed URL page and running iTunes 9.1, it is very likely your problem.
In any event, here is a quick and dirty source code workaround to sidestep the issue: iTunes.patch.
Note that this workaround only helps a system administrator/IT type who can rebuild dansguardian from source and install it into your production environment.
I tried to take an approach where Dansguardian would see the URL internally as the non-dotted version so that URL regex’s would not be thrown off, but it is possible that my patch breaks some host or URL matching/filtering within Dansguardian (content filtering should be unaffected).
WARNING: Use the above patch at your own risk.