Blog previously known as 'Home Theatre PC'
Comments have been disabled due to spam and lack of time for moderation.
Use the contact link on top to get in touch if you wish.
« 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

  09/02/10 16:57, by Esa, 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

Search

Contents

powered by b2evolution free blog software
 

©2019 by admin

Contact | Help | Blog skin by Asevo | blog software | PHP hosting