JackieJ / proxy-vole

Automatically exported from code.google.com/p/proxy-vole
0 stars 1 forks source link

Issue when multiple proxies get returned #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup IE to use a PAC file which has multiple proxies such as the following

function FindProxyForURL(url, host)
{
    return "PROXY my-proxy.com:80; PROXY my-proxy2.com:8080;";
}.

What is the expected output? What do you see instead?

Using proxy-vole to print the list of proxies
the result will be the following 

proxy hostname  my-proxy.com
proxy port  80

proxy hostname   my-proxy2.com:8080
proxy port  80

The second proxy hostname should be "my-proxy2.com", instead it named 
"my-proxy2.com:8080". The port is also incorrect.

What version of the product are you using? On what operating system?
Windows 7
IE 8
proxy-vole_20100914

Please provide any additional information below.

The problem occurs in PacProxySelector class on the following line

// Split port from host
String[] token = host.split("[: ]+");

Due to a white space padding on host string, the token array has 3 elements 
instead of 2 and the following logic does not get executed

if (token.length == 2) {
   host = token[0];
   port = Integer.parseInt(token[1]);
} 

Regards,
Jimmy

Original issue reported on code.google.com by jimmy.co...@gmail.com on 10 Feb 2011 at 1:40

GoogleCodeExporter commented 8 years ago
Hello Jimmy,
I have improved the script result parsing.
The issue is fixed. The fix is already in the repository and I have also 
release a new version in the downloads section.
This one includes the fix and also some other smaller fixes.

Thanks for reporting this.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 10 Feb 2011 at 7:11

GoogleCodeExporter commented 8 years ago

Original comment by rosstaus...@googlemail.com on 10 Feb 2011 at 7:11

GoogleCodeExporter commented 8 years ago
Hi Rossi,
Thanks for the quick update and fix!! Much appreciated.
Cheers,
Jimmy

Original comment by jimmy.co...@gmail.com on 10 Feb 2011 at 10:13