binarycrusader / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Ignores are inaccurate and hit 'too often' #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
svn rev 803
- using config_gnome3 / pxgsettings (have the same problem with 
config_gnome/pxgconf at least)

Proxy settings are (as per output from pxgsettings:
org.gnome.system.proxy/autoconfig-url   http://10.3.0.4/proxy.pac
org.gnome.system.proxy/ignore-hosts localhost,127.0.0.1,10.0.0.0/8,*.tmf-group.c
om
org.gnome.system.proxy/mode manual
org.gnome.system.proxy/use-same-proxy   true
org.gnome.system.proxy.http/authentication-password 
org.gnome.system.proxy.http/authentication-user 
org.gnome.system.proxy.http/enabled false
org.gnome.system.proxy.http/host    10.3.0.2
org.gnome.system.proxy.http/port    2323
org.gnome.system.proxy.http/use-authentication  false

=> with this config, issuing
proxy http://www.google.nl returns direct://
proxy http://www.google.nl. returns http://10.3.0.2:2323
proxy http://www.google.com returns http://10.3.0.2:2323

There is no reason why
a) www.google.nl returns direct://
b) first and 2nd would be handled differently.. a trailing dot in a host is 
just the technical representation for 'root of dns'

Original issue reported on code.google.com by dominiqu...@gmail.com on 2 May 2011 at 6:47

GoogleCodeExporter commented 9 years ago
This code is responsible for this:

/* Endswith (.domain.com or .domain.com:80) */
if (ihost[0] == '.' && host.find(ihost) == host.size() - ihost.size())
    return (iport == 0 || port == iport);

My example above:
ihost = .tmf-group.com
 host = www.google.nl
The 'difference' in legth == 1 char shorter.
host.find(ihost) = -1 mean not found, but also matches the host.size - 
ihost.size formula...

Original comment by dominiqu...@gmail.com on 2 May 2011 at 8:16

GoogleCodeExporter commented 9 years ago
Fixed in r805

Original comment by dominiqu...@gmail.com on 2 May 2011 at 8:46