From f2c97658c17d22966b887f9ed1bf41aa5c152d47 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 22 Mar 2010 12:27:11 +0000 Subject: [PATCH] 2010-03-22 Tatsuhiro Tsujikawa Do exact match if IP address is specified in --no-proxy. * src/AbstractCommand.cc --- ChangeLog | 5 +++++ src/AbstractCommand.cc | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a28c68e7..7e314ff2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-22 Tatsuhiro Tsujikawa + + Do exact match if IP address is specified in --no-proxy. + * src/AbstractCommand.cc + 2010-03-22 Tatsuhiro Tsujikawa Fixed the bug that socket is added to EventPoll object twice. This diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 22e01b32..084b10c2 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -464,7 +464,11 @@ static bool inNoProxy(const SharedHandle& req, eoi = entries.end(); i != eoi; ++i) { std::string::size_type slashpos = (*i).find('/'); if(slashpos == std::string::npos) { - if(domainMatch(*i)) { + if(util::isNumericHost(*i)) { + if(req->getHost() == *i) { + return true; + } + } else if(domainMatch(*i)) { return true; } } else {