Bug 1174 - proxy settings interfere with localhost
: proxy settings interfere with localhost
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 6.0.0
: PC Windows (legacy)
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-23 12:40 UTC by KDF
Modified: 2008-08-18 10:53 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description KDF 2005-03-23 12:40:51 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.
Comment 1 Blackketter Dean 2005-03-23 14:19:56 UTC
Can you attach the d_remotestream output when this happens?  Slim::Player::Protocols::HTTP should be 
doing the right thing about line 75...
Comment 2 KDF 2005-03-23 14:28:06 UTC
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.
Comment 3 Blackketter Dean 2005-03-23 16:23:16 UTC
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";
        }
Comment 4 KDF 2005-03-23 16:31:13 UTC
yup. that works for me :)
Comment 5 KDF 2005-03-23 18:37:12 UTC
committed r2697