sunzhenguo / pacparser

Automatically exported from code.google.com/p/pacparser
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Case-sensitive host-matching behaviour #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Supplying a URL with different case formats, e.g., www.mydomain.com vs. 
WWW.mydomain.com, pacparser treats the two as different resources.

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

The expected result of an evaluation like this should be identical in both 
cases, since hostnames are case-insensitive. However, I am getting two distinct 
results for what should be the same host. Explicitly converting strings to all 
lowercase causes both queries to return the identical, expected result.

What version of the product are you using? On what operating system?

1.3.1 on OSX 10.8

Please provide any additional information below.

According to the FAQ here: http://findproxyforurl.com/misconceptions/

"In order to perform host matching the host variable must be converted to 
lowercase.
False. Implementing such code has been found unnecessary in all major browsers 
(Internet Explorer, Firefox, Chrome, and Safari).
No browser has been found to require that the host be converted to lowercase in 
order to prevent case sensitive matching issues. Unlike URLs, hosts are case 
insensitive therefore any PAC rule mechanism should automatically assume case 
insensitivity when matching hosts."

cheers,
Klaus

Original issue reported on code.google.com by klausfi...@gmail.com on 16 Sep 2013 at 8:06