Small tweaks to the socket code for IE crasher
Andy Grundman [Wed, 25 Oct 2006 15:21:57 +0000 (15:21 +0000)]
Changes
lib/Catalyst/Engine/HTTP.pm

diff --git a/Changes b/Changes
index 33fef83..6092d19 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,7 +1,7 @@
 This file documents the revision history for Perl extension Catalyst.
 
 ?5.7004? 2006-10-25 ??:??:??
-        - Fix Engine::HTTP crash when using IE. (Jesper Krogh)
+        - Fix Engine::HTTP crash when using IE. (Jesper Krogh, Peter Edwards)
         - clean up Catalyst::Utils to handle some edge cases
         - Properly work around lighttpd PATH_INFO vs. SCRIPT_NAME bug.
           (Mark Blythe)
index 881bf27..6da9325 100644 (file)
@@ -335,10 +335,11 @@ sub _parse_request_line {
 sub _socket_data {
     my ( $self, $handle ) = @_;
 
-    my $iaddr;
-    
     my $remote_sockaddr       = getpeername($handle);
-    ( undef, $iaddr )         = sockaddr_in($remote_sockaddr);
+    my ( undef, $iaddr )      = $remote_sockaddr 
+        ? sockaddr_in($remote_sockaddr) 
+        : (undef, undef);
+        
     my $local_sockaddr        = getsockname($handle);
     my ( undef, $localiaddr ) = sockaddr_in($local_sockaddr);