Ver Fonte

2010-03-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Do exact match if IP address is specified in --no-proxy.
	* src/AbstractCommand.cc
Tatsuhiro Tsujikawa há 15 anos atrás
pai
commit
f2c97658c1
2 ficheiros alterados com 10 adições e 1 exclusões
  1. 5 0
      ChangeLog
  2. 5 1
      src/AbstractCommand.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2010-03-22  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
+
+	Do exact match if IP address is specified in --no-proxy.
+	* src/AbstractCommand.cc
+
 2010-03-22  Tatsuhiro Tsujikawa  <t-tujikawa@users.sourceforge.net>
 
 	Fixed the bug that socket is added to EventPoll object twice. This

+ 5 - 1
src/AbstractCommand.cc

@@ -464,7 +464,11 @@ static bool inNoProxy(const SharedHandle<Request>& 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 {