coowoole / vosao

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

Too strong checking for SKIP_URLS #558

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The method for checking if a url is reserved looks like:

    private boolean isSkipUrl(String url) {
        for (String u : SiteFilter.SKIP_URLS) {
            if (url.startsWith(u)) return true;
        }
        return false;
    }

but this is too much.  /setup is reserved, but with this code, I cannot have 
/setuptoday as a url.  More robust checking would fix this.  How about:

  if (url.split("\\/")[1].equals(u)) return true;

Original issue reported on code.google.com by tjhn...@gmail.com on 15 Feb 2012 at 11:32

GoogleCodeExporter commented 9 years ago
I guess that doesn't do it since the SKIP urls have "/" in front, but you get 
the idea.

Original comment by tjhn...@gmail.com on 15 Feb 2012 at 11:34