Etsitkö asiaa kotimaan kielellä kotiautomaatiosta (X10, 1-wire) tai talonrakennukseen liittyvistä asioista? Ne löytyvät nykyään täältä toiselta osastolta.
Blog previously known as 'Home Theatre PC'
« Samba (smb,cifs) share from Mac OSX Snow Leopard to LinuxSubsonic 4.0.1 web interface over https »

iTunes fails to connect to iTunes Store

Permalink 09/02/10 16:57, by Esa Viitala, Categories: Software

Apple actually introduced a bug in iTunes 9.1, and it still isn't fixed in iTunes 10.

Under normal circumstances the bug doesn't matter, but it does if you use dansguardian, possibly others as well. At first I tried to figure out what is wrong with my squid (transparent proxy) but in the end the problem turned out to be dansguardian (well, itunes, but I can't fix that).

Apple has somewhere in their code additional 'dot' in url they are requesting http://ax.init.itunes.apple.com./ dansguardian throws malformed url error for url's like that. The fix is really simple, but still requires you to patch the source and recompile.

The fix is to just chop the damn thing off before dansguardian does whatever it does with it. I haven't noticed anything breaking because of this :)

--- dansguardian-2.10.0.3/src/HTTPHeader.cpp	2010-09-02 16:49:18.000000000 +0300
+++ dansguardian-2.10.0.3-fixed/src/HTTPHeader.cpp	2010-09-02 16:48:00.000000000 +0300
@@ -941,6 +941,10 @@ String HTTPHeader::url()
 				}
 				hostname.removeWhiteSpace();  // remove rubbish like
 				// ^M and blanks
+                		if (hostname.endsWith(".")) {
+                  			hostname.chop();
+                		}
+
 				hostname = "http://" + hostname;
 				answer = hostname + answer;
 			}

 

There's the patch, if you're not familiar with patch, you can just find the location in that file (HTTPHeader.cpp) and add the lines marked with '+' and the do the regular ./configure && make && make install magic.

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

Contents

Search

powered by b2evolution free blog software