[Catalyst-commits] r13063 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst/Engine

ijw at dev.catalyst.perl.org ijw at dev.catalyst.perl.org
Mon Mar 22 11:30:38 GMT 2010


Author: ijw
Date: 2010-03-22 11:30:38 +0000 (Mon, 22 Mar 2010)
New Revision: 13063

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm
Log:
Disabled name lookup for server hostname in favour of returning IP address.  Annoyingly, I can't find any actual use of the name in this module (it's passed as SERVER_NAME in the env), but we believe it ends up in the 'Host' header.

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2010-03-22 11:07:22 UTC (rev 13062)
+++ Catalyst-Runtime/5.80/trunk/Changes	2010-03-22 11:30:38 UTC (rev 13063)
@@ -11,6 +11,10 @@
      in parameter filtering (for example).
    - $c->model/view/controller have become a lot faster for non-regexp names
      by using direct hash lookup instead of looping.
+   - Now reports the used server address as an IP string rather than a
+     looked up hostname (because nothing really cares and hostname
+     lookups, even on local interfaces, can be slow on dev machines with
+     hosed DNS setups)
 
   Bug fixed:
     - DispatchType::Index's uri_for_action only returns for actions registered

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm	2010-03-22 11:07:22 UTC (rev 13062)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Engine/HTTP.pm	2010-03-22 11:30:38 UTC (rev 13063)
@@ -534,8 +534,7 @@
         peeraddr  => $iaddr
             ? ( inet_ntoa($iaddr) || '127.0.0.1' )
             : '127.0.0.1',
-        localname => gethostbyaddr( $localiaddr, AF_INET ) || 'localhost',
-        localaddr => inet_ntoa($localiaddr) || '127.0.0.1',
+        localname => inet_ntoa($localiaddr) || '127.0.0.1',
     };
 
     return $data;




More information about the Catalyst-commits mailing list