Bugzilla – Bug 1174
proxy settings interfere with localhost
Last modified: 2008-08-18 10:53:01 UTC
if I set my server settings->network->web proxy to my network proxy server, I get failures trying to connect to musicmagic at 127.0.0.1:10002 perhaps we need some proxy exceptions.
Can you attach the d_remotestream output when this happens? Slim::Player::Protocols::HTTP should be doing the right thing about line 75...
set web proxy to 10.x.x.xxx:8080, stop server. now restart.... D:\slim\server>slimserver.pl --d_remotestream --d_musicmagic AlienBBC reports Version 6 Server says: 1 2005-03-23 14:19:01.8267 MusicMagic: Testing for API on 127.0.0.1:10002 2005-03-23 14:19:01.8274 Opening connection to http://127.0.0.1:10002/api/version: [127.0.0.1 on port 10002 with path /api/version with timeout 5] 2005-03-23 14:19:01.8325 Request: GET http://127.0.0.1:10002/api/version HTTP/1.0 Host: 127.0.0.1:10002 User-Agent: iTunes/3.0 (MSWin32; SlimServer 6.0b3) Accept: */* Cache-Control: no-cache Connection: close Icy-MetaData:1 2005-03-23 14:19:01.8344 Response: HTTP/1.0 500 Internal Server Error 2005-03-23 14:19:01.8347 Invalid response code (500) from remote stream http://127.0.0.1:10002/api/version 2005-03-23 14:19:01.8352 MusicMagic: Cannot Connect now erase web proxy setting, go into plugins, which attempts to connect again: 2005-03-23 14:19:17.9687 MusicMagic: Testing for API on 127.0.0.1:10002 2005-03-23 14:19:17.9691 Opening connection to http://127.0.0.1:10002/api/version: [127.0.0.1 on port 10002 with path /api/version with timeout 5] 2005-03-23 14:19:17.9782 Request: GET /api/version HTTP/1.0 Host: 127.0.0.1:10002 User-Agent: iTunes/3.0 (MSWin32; SlimServer 6.0b3) Accept: */* Cache-Control: no-cache Connection: close Icy-MetaData:1 2005-03-23 14:19:17.9821 Response: HTTP/1.0 200 OK 2005-03-23 14:19:17.9865 header: Content-Type: text/plain 2005-03-23 14:19:17.9875 header: 2005-03-23 14:19:17.9878 Recieved final blank line... 2005-03-23 14:19:17.9880 opened stream! 2005-03-23 14:19:17.9885 MusicMagic: Predixis MusicMagic Mixer. Version 1.1.5 2005-03-23 14:19:17.9893 Opening connection to http://127.0.0.1:10002/api/cacheid: [127.0.0.1 on port 10002 with path /api/cacheid with timeout 30] 2005-03-23 14:19:18.9955 Request: GET /api/cacheid HTTP/1.0 Host: 127.0.0.1:10002 User-Agent: iTunes/3.0 (MSWin32; SlimServer 6.0b3) Accept: */* Cache-Control: no-cache Connection: close Icy-MetaData:1 2005-03-23 14:19:18.9975 Response: HTTP/1.0 200 OK 2005-03-23 14:19:18.9983 header: Content-Type: text/plain 2005-03-23 14:19:18.9991 header: 2005-03-23 14:19:18.9993 Recieved final blank line... 2005-03-23 14:19:18.9995 opened stream! all happy now.
Ah, ok. I see. Can you try this and commit it if it works? Index: Protocols/HTTP.pm =============================================================== ==== --- Protocols/HTTP.pm (revision 2688) +++ Protocols/HTTP.pm (working copy) @@ -149,7 +149,7 @@ my $timeout = $self->timeout(); my $proxy = Slim::Utils::Prefs::get('webproxy'); - if ($proxy) { + if ($proxy && $server ne 'localhost' && $server ne '127.0.0.1') { $path = "http://$server:$port$path"; }
yup. that works for me :)
committed r2697