diff options
author | dominique.leuenberger@gmail.com <dominique.leuenberger@gmail.com@c587cffe-e639-0410-9787-d7902ae8ed56> | 2011-08-08 15:49:29 +0000 |
---|---|---|
committer | dominique.leuenberger@gmail.com <dominique.leuenberger@gmail.com@c587cffe-e639-0410-9787-d7902ae8ed56> | 2011-08-08 15:49:29 +0000 |
commit | 5f2c33fcd8e19da8fd05be942b56d42848a12c7c (patch) | |
tree | e4155b652d808e45c6a6d862bb623f41ced59fe9 | |
parent | cd18f67c4bee5e9c89c75fa4d1849d5b79c46a1e (diff) | |
download | libproxy-git-5f2c33fcd8e19da8fd05be942b56d42848a12c7c.tar.gz |
Trim the ignore-values before comparing them
-rw-r--r-- | libproxy/proxy.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libproxy/proxy.cpp b/libproxy/proxy.cpp index e7c88ee..e9e5026 100644 --- a/libproxy/proxy.cpp +++ b/libproxy/proxy.cpp @@ -268,6 +268,7 @@ void proxy_factory::_get_proxies(url *realurl, vector<string> &response) { if (next == string::npos) next = confign.length(); if (next > (i+1)) { string ignorestr = confign.substr (i, next - i); + ignorestr = ignorestr.substr(ignorestr.find_first_not_of(" \t\n"), ignorestr.find_last_not_of(" \t\n")+1); for (vector<ignore_extension*>::iterator it=ignores.begin() ; it != ignores.end() && !ignored ; it++) ignored = ((*it)->ignore(*realurl, ignorestr)); } |