[Rt-commit] r3939 - in HTTP-Server-Simple: . lib/HTTP/Server t

jesse at bestpractical.com jesse at bestpractical.com
Fri Oct 7 00:54:27 EDT 2005


Author: jesse
Date: Fri Oct  7 00:54:26 2005
New Revision: 3939

Modified:
   HTTP-Server-Simple/   (props changed)
   HTTP-Server-Simple/Changes
   HTTP-Server-Simple/SIGNATURE
   HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
   HTTP-Server-Simple/t/04cgi.t
Log:
 r17216 at hualien:  jesse | 2005-10-06 20:51:10 -0400
 * Turned off remote host resolution


Modified: HTTP-Server-Simple/Changes
==============================================================================
--- HTTP-Server-Simple/Changes	(original)
+++ HTTP-Server-Simple/Changes	Fri Oct  7 00:54:26 2005
@@ -1,9 +1,12 @@
+0.14 Thu Oct  6 20:48:49 EDT 2005
 
   Split out HTTP::Server::Simple::CGI::Environment to support non-CGI.pm CGIs
   Ignore SIGPIPE
   
   Signal handlers are now installed on ->run, not on new. Also, they're 
   documented. Thanks to Mark Fowler.
+ 
+  We no longer lookup $ENV{'REMOTE_HOST'} by hostname, as it can cause huge performance problems.
 
 0.13 Tue Aug  9 21:25:20 EDT 2005
 

Modified: HTTP-Server-Simple/SIGNATURE
==============================================================================
--- HTTP-Server-Simple/SIGNATURE	(original)
+++ HTTP-Server-Simple/SIGNATURE	Fri Oct  7 00:54:26 2005
@@ -14,7 +14,7 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 7ea3dd9fcdcc2607cafa9c82edb70090297658c5 Changes
+SHA1 0c488ab4994eac2508accc469185829250c0cfcf Changes
 SHA1 0ac508c50476dcc2bf8fe3094cb341425291e1ee MANIFEST
 SHA1 c2533ce46b89fa0eb1e0c864548265ade18b241e META.yml
 SHA1 490f3fd115e09cb05b725580e5ed5cdd58241049 Makefile.PL
@@ -28,18 +28,18 @@
 SHA1 e448c6dc5351ef425e3f8bdbeb642409120bc3ca inc/Module/Install/Metadata.pm
 SHA1 134de6ff2f762873b6a1af950dd53f8e0a801d73 inc/Module/Install/Win32.pm
 SHA1 1ec06df292af7f652d33db6129e9e4c7cc8b5095 inc/Module/Install/WriteAll.pm
-SHA1 f7db491bac7b362f278320d7b20eacd786ff0e91 lib/HTTP/Server/Simple.pm
+SHA1 06b36f6f427c6875da7820aad7b8e9394d3d9844 lib/HTTP/Server/Simple.pm
 SHA1 2d7348b166f654a460ddae4cb4183f4a544c85fc lib/HTTP/Server/Simple/CGI.pm
 SHA1 b2c2d007a7f50058c874e633d15fb621b2bfc394 lib/HTTP/Server/Simple/CGI/Environment.pm
 SHA1 db064af54cab345a71daec576e32e64b8fb1033d t/00smoke.t
 SHA1 9e68bffc26b5a42e2785ec68c3bf6fe45d6bb6da t/01live.t
 SHA1 aca95653cfce68912e08c57b3a4566207e2f99b3 t/02pod.t
 SHA1 90f0be3e6b0fab021155953742f5cc5c5e47a5aa t/03podcoverage.t
-SHA1 bc768072c7b03bd801a81936ef79bbe42e05f98f t/04cgi.t
+SHA1 0ca7d32c396129b38a33a8077171b84076feb8d9 t/04cgi.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.1 (GNU/Linux)
 
-iD8DBQFDICmtEi9d9xCOQEYRAoTFAJsFd7pPRvKuk3Xv+jKNirjtKF/WygCcD+gb
-zaqfBZgDtraQcolBjG0gqkY=
-=MKBE
+iD8DBQFDRcZnEi9d9xCOQEYRAmcYAKDJT9P5g0hQ68daT5pKYezBphnXeACgiwQj
+xYtb10mwSbpvxpnJQlR41so=
+=R/F0
 -----END PGP SIGNATURE-----

Modified: HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
==============================================================================
--- HTTP-Server-Simple/lib/HTTP/Server/Simple.pm	(original)
+++ HTTP-Server-Simple/lib/HTTP/Server/Simple.pm	Fri Oct  7 00:54:26 2005
@@ -247,14 +247,11 @@
 
         my $remote_sockaddr = getpeername( $self->stdio_handle );
         my ( undef, $iaddr ) = sockaddr_in($remote_sockaddr);
-        my $peername = gethostbyaddr( $iaddr, AF_INET ) || "localhost";
-
         my $peeraddr = inet_ntoa($iaddr) || "127.0.0.1";
 
         my $local_sockaddr = getsockname( $self->stdio_handle );
         my ( undef, $localiaddr ) = sockaddr_in($local_sockaddr);
-        my $localname = gethostbyaddr( $localiaddr, AF_INET )
-            || "localhost";
+        my $localname = gethostbyaddr( $localiaddr, AF_INET ) || "localhost";
         my $localaddr = inet_ntoa($localiaddr) || "127.0.0.1";
 
         my ( $method, $request_uri, $proto ) = $self->parse_request
@@ -278,7 +275,7 @@
             path         => $file,
             localname    => $localname,
             localport    => $self->port,
-            peername     => $peername,
+            peername     => $peeraddr,
             peeraddr     => $peeraddr,
         );
 

Modified: HTTP-Server-Simple/t/04cgi.t
==============================================================================
--- HTTP-Server-Simple/t/04cgi.t	(original)
+++ HTTP-Server-Simple/t/04cgi.t	Fri Oct  7 00:54:26 2005
@@ -1,4 +1,4 @@
-use Test::More tests => 22;
+use Test::More tests => 20;
 use Socket;
 use strict;
 
@@ -8,7 +8,6 @@
 our %methods=(
               url => "url: http://$host:".PORT,
               path_info => 'path_info: /cgitest/path_info',
-              remote_host => "remote_host: $host",
               server_name => "server_name: $host",
               server_port => 'server_port: '.PORT,
               server_software => 'server_software: HTTP::Server::Simple/\d+.\d+',
@@ -23,7 +22,6 @@
               SERVER_PROTOCOL => 'SERVER_PROTOCOL: HTTP/1.1',
               SERVER_NAME => "SERVER_NAME: $host",
               SERVER_SOFTWARE => 'SERVER_SOFTWARE: HTTP::Server::Simple/\d+.\d+',
-              REMOTE_HOST => "REMOTE_HOST: $host",
               REMOTE_ADDR => 'REMOTE_ADDR: 127.0.0.1',
               QUERY_STRING => 'QUERY_STRING: ',
               PATH_INFO => 'PATH_INFO: /cgitest/PATH_INFO',


More information about the Rt-commit mailing list