http requests behind a proxy fails

Post your Server Bug Report
Jay Freeman
Posts: 16
Joined: 25 May 2016, 14:57
Has thanked: 0
Been thanked: 7 times

http requests behind a proxy fails

Unread post by Jay Freeman »

I originally asked a question in support regarding proxies (http://forum.madsonic.org/viewtopic.php?f=62&t=1828)

Seems this is a genuine bug, so I'm reporting it here also.

Calls to HttpGet should be passed a proxy via the RequestCofig object.

Code: Select all

   HttpGet method = new HttpGet(url);
   HttpHost proxy = new HttpHost(httpProxy, httpProxyPort, "http");
   RequestConfig requestConfig = RequestConfig.custom()
      .setProxy(proxy)
      .setSocketTimeout(timeout)
      .setConnectTimeout(timeout)
      .setConnectionRequestTimeout(timeout)
      .build();
   method.setConfig(requestConfig);
Thanks
Jay Freeman
Posts: 16
Joined: 25 May 2016, 14:57
Has thanked: 0
Been thanked: 7 times

Re: http requests behind a proxy fails

Unread post by Jay Freeman »

Equally, LAstFMService.java never sets the proxy, even though there is a setProxy method.
These users thanked the author Jay Freeman for the post:
Madsonic
Rating: 7.69%
Post Reply